Forgetting "()" when calling methods

Alex Martelli aleax at aleax.it
Sun Apr 27 03:27:57 EDT 2003


Aahz wrote:
   ...
> Anyway, all objects that do not implement a __nonzero__ method are true:

...unless they implement __len__, which is used as a fallback if it's
present but __nonzero__ is absent (I'm sure Aahz know this, I'm just
dotting t's and crossing i's for other readers who might not).


Alex





More information about the Python-list mailing list