Benjamin Peterson <[email protected]> added the comment: On Tue, Feb 17, 2009 at 1:27 PM, Antoine Pitrou <[email protected]> wrote: > > Antoine Pitrou <[email protected]> added the comment: > > If iterators don't want their boolean value to be messed up, couldn't > they simply use __bool__ for that?
Since there is no base iterator class, that would complicate the API and lead to subtle bugs. Personally, I don't think any iterators should supported len() at all. _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue1283110> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
