Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> 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.

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14924>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to