summaryrefslogtreecommitdiffstats
path: root/Doc/reference/datamodel.rst
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-07-07 00:45:43 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-07-07 00:45:43 (GMT)
commit79fa5ab7b0744ab5b74ecf2de0a17ef604e0097e (patch)
treebaabcbcd2153799d2c9467ea019e6b519616d5df /Doc/reference/datamodel.rst
parentc9722e56d502a353d91881b48a788ab2470886d9 (diff)
downloadcpython-79fa5ab7b0744ab5b74ecf2de0a17ef604e0097e.zip
cpython-79fa5ab7b0744ab5b74ecf2de0a17ef604e0097e.tar.gz
cpython-79fa5ab7b0744ab5b74ecf2de0a17ef604e0097e.tar.bz2
Merged revisions 73868 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r73868 | amaury.forgeotdarc | 2009-07-07 02:43:08 +0200 (mar., 07 juil. 2009) | 3 lines #6428: py3k requires that __bool__ return a bool (and not an int) Fix the error message and the documentation. ........
Diffstat (limited to 'Doc/reference/datamodel.rst')
-rw-r--r--Doc/reference/datamodel.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 2161706..d0aa59f 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1254,11 +1254,11 @@ Basic customization
.. index:: single: __len__() (mapping object method)
Called to implement truth value testing and the built-in operation
- ``bool()``; should return ``False`` or ``True``, or their integer equivalents
- ``0`` or ``1``. When this method is not defined, :meth:`__len__` is called,
- if it is defined, and the object is considered true if its result is nonzero.
- If a class defines neither :meth:`__len__` nor :meth:`__bool__`, all its
- instances are considered true.
+ ``bool()``; should return ``False`` or ``True``. When this method is not
+ defined, :meth:`__len__` is called, if it is defined, and the object is
+ considered true if its result is nonzero. If a class defines neither
+ :meth:`__len__` nor :meth:`__bool__`, all its instances are considered
+ true.
.. _attribute-access: