Nick Coghlan added the comment:

+1 for adding this. It's simple to implement, simple to explain and the 
alternatives for dealing with the empty iterable case (or even the fact it may 
need to be handled at all) are definitely not obvious.

The relationship to next() is straightforward: the supplied value is 
effectively used as the default value for the first next call when iterating 
and then ignored thereafter.

----------
nosy: +ncoghlan

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

Reply via email to