New submission from Ezio Melotti <ezio.melo...@gmail.com>: 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__ ---------- assignee: georg.brandl components: Documentation messages: 83630 nosy: ezio.melotti, georg.brandl severity: normal status: open title: Rephrasing the doc of object.__nonzero__ _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5493> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com