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.
Created on 2009年03月15日 13:21 by ezio.melotti, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg83630 - (view) | Author: Ezio Melotti (ezio.melotti) * (Python committer) | Date: 2009年03月15日 13:21 | |
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__ |
|||
| msg83642 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2009年03月15日 21:37 | |
Thanks, fixed in r70387. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:46 | admin | set | github: 49743 |
| 2009年03月15日 21:45:03 | georg.brandl | set | status: open -> closed |
| 2009年03月15日 21:37:31 | georg.brandl | set | resolution: fixed messages: + msg83642 |
| 2009年03月15日 13:21:22 | ezio.melotti | create | |