mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Clarify the return value of __nonzero__(): It *must* be an integer.
Closes SF bug #579991.
This commit is contained in:
parent
979c53757b
commit
3e59f72075
1 changed files with 3 additions and 3 deletions
|
@ -47,9 +47,9 @@ The following values are considered false:
|
|||
|
||||
\item instances of user-defined classes, if the class defines a
|
||||
\method{__nonzero__()} or \method{__len__()} method, when that
|
||||
method returns zero.\footnote{Additional information on these
|
||||
special methods may be found in the \citetitle[../ref/ref.html]{Python
|
||||
Reference Manual}.}
|
||||
method returns the integer zero.\footnote{Additional
|
||||
information on these special methods may be found in the
|
||||
\citetitle[../ref/ref.html]{Python Reference Manual}.}
|
||||
|
||||
\end{itemize}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue