diff options
author | Fred Drake <fdrake@acm.org> | 2002-08-07 15:40:15 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2002-08-07 15:40:15 (GMT) |
commit | 442c7c77430136ae4ef399fd24cef5ea8720cf25 (patch) | |
tree | 5fd0ab91922f97c0d149c19dfccba66643bfc535 /Doc/lib | |
parent | 2863c10a86de1073d3e556779e326b6065347b2c (diff) | |
download | cpython-442c7c77430136ae4ef399fd24cef5ea8720cf25.zip cpython-442c7c77430136ae4ef399fd24cef5ea8720cf25.tar.gz cpython-442c7c77430136ae4ef399fd24cef5ea8720cf25.tar.bz2 |
Clarify that the bool instances are acceptable return values from
__nonzero__(), in response to SF bug #579991.
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/libstdtypes.tex | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index 5caefb3..d3e0079 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -33,10 +33,10 @@ The following values are considered false: \begin{itemize} \item \code{None} - \withsubitem{(Built-in object)}{\ttindex{None}} + \withsubitem{(Built-in object)}{\ttindex{None}} \item \code{False} - \withsubitem{(Built-in object)}{\ttindex{False}} + \withsubitem{(Built-in object)}{\ttindex{False}} \item zero of any numeric type, for example, \code{0}, \code{0L}, \code{0.0}, \code{0j}. @@ -46,8 +46,9 @@ The following values are considered false: \item any empty mapping, for example, \code{\{\}}. \item instances of user-defined classes, if the class defines a - \method{__nonzero__()} or \method{__len__()} method, when that - method returns the integer zero.\footnote{Additional + \method{__nonzero__()} or \method{__len__()} method, when that + method returns the integer zero or \class{bool} value + \code{False}.\footnote{Additional information on these special methods may be found in the \citetitle[../ref/ref.html]{Python Reference Manual}.} |