diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-07-07 00:43:08 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2009-07-07 00:43:08 (GMT) |
commit | 097cd072c052382d9a85375340b90ab59ce243f7 (patch) | |
tree | 828c079b6ac06ffdc3f80b28e8a22c8c40ccbf13 /Doc/reference | |
parent | dd07ebb44a9c5c632d1a8177fcf617b5af1250ec (diff) | |
download | cpython-097cd072c052382d9a85375340b90ab59ce243f7.zip cpython-097cd072c052382d9a85375340b90ab59ce243f7.tar.gz cpython-097cd072c052382d9a85375340b90ab59ce243f7.tar.bz2 |
#6428: py3k requires that __bool__ return a bool (and not an int)
Fix the error message and the documentation.
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/datamodel.rst | 10 |
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: |