This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti, georg.brandl
Date 2009-03-15.13:21:22
SpamBayes Score 4.0948302e-07
Marked as misclassified No
Message-id <1237123284.32.0.590929476776.issue5493@psf.upfronthosting.co.za>
In-reply-to
Content
The doc [1] actually says:
object.__nonzero__(self)
    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, __len__() is called, if it is
defined (see below). If a class defines neither __len__() nor
__nonzero__(), all its instances are considered true.

I suggest to:
1) drop the comma after 'testing';
2) clarify what happens when __nonzero__ is defined and where 'below'
actually is (and possibly add a link).


[1]: http://docs.python.org/reference/datamodel.html#object.__nonzero__
History
Date User Action Args
2009-03-15 13:21:24ezio.melottisetrecipients: + ezio.melotti, georg.brandl
2009-03-15 13:21:24ezio.melottisetmessageid: <1237123284.32.0.590929476776.issue5493@psf.upfronthosting.co.za>
2009-03-15 13:21:22ezio.melottilinkissue5493 messages
2009-03-15 13:21:22ezio.melotticreate