Kaydet (Commit) 6cd5377c authored tarafından Georg Brandl's avatar Georg Brandl

Empty sets and frozensets are also false.

üst 1823ae7e
...@@ -1021,9 +1021,9 @@ Boolean operations have the lowest priority of all Python operations: ...@@ -1021,9 +1021,9 @@ Boolean operations have the lowest priority of all Python operations:
In the context of Boolean operations, and also when expressions are In the context of Boolean operations, and also when expressions are
used by control flow statements, the following values are interpreted used by control flow statements, the following values are interpreted
as false: \code{False}, \code{None}, numeric zero of all types, empty as false: \code{False}, \code{None}, numeric zero of all types, and empty
sequences (strings, tuples and lists), and empty mappings (dictionaries). strings and containers (including strings, tuples, lists, dictionaries,
All other values are interpreted as true. sets and frozensets). All other values are interpreted as true.
The operator \keyword{not} yields \code{True} if its argument is false, The operator \keyword{not} yields \code{True} if its argument is false,
\code{False} otherwise. \code{False} otherwise.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment