diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-09-23 13:32:46 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-09-23 13:32:46 (GMT) |
commit | fe7c26d94274febc77b707324086306b1d96354b (patch) | |
tree | eba4f1ce10149692b3de2f428e4d72008ba81406 /Doc/reference | |
parent | 3e876fd146ea9b77b2467cd999425831a80abbcb (diff) | |
download | cpython-fe7c26d94274febc77b707324086306b1d96354b.zip cpython-fe7c26d94274febc77b707324086306b1d96354b.tar.gz cpython-fe7c26d94274febc77b707324086306b1d96354b.tar.bz2 |
mention how to override boolean evaluation
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/expressions.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 1566a99..e5e40cf 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -1143,7 +1143,8 @@ In the context of Boolean operations, and also when expressions are used by control flow statements, the following values are interpreted as false: ``False``, ``None``, numeric zero of all types, and empty strings and containers (including strings, tuples, lists, dictionaries, sets and frozensets). All -other values are interpreted as true. +other values are interpreted as true. (See the :meth:`~object.__nonzero__` +special method for a way to change this.) .. index:: operator: not |