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 rhettinger
Recipients ezio.melotti, fgracia, mrabarnett, rhettinger
Date 2012-05-27.16:52:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338137555.04.0.766746560495.issue14924@psf.upfronthosting.co.za>
In-reply-to
Content
> All iterators are always true,

More generally, all objects are true by default.  The only false objects in Python are None; container-like objects with a __len__ that returns zero; and number-like objects with a __nonzero__ method that returns False.

Guido decided that iterators should not be treated like containers and should not have a __len__ method.
History
Date User Action Args
2012-05-27 16:52:35rhettingersetrecipients: + rhettinger, ezio.melotti, mrabarnett, fgracia
2012-05-27 16:52:35rhettingersetmessageid: <1338137555.04.0.766746560495.issue14924@psf.upfronthosting.co.za>
2012-05-27 16:52:34rhettingerlinkissue14924 messages
2012-05-27 16:52:34rhettingercreate