Author ncoghlan
Recipients Julian, ncoghlan, r.david.murray, rhettinger, skrah, twouters
Date 2013-06-03.12:51:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370263904.88.0.902374192219.issue18111@psf.upfronthosting.co.za>
In-reply-to
Content
+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.
History
Date User Action Args
2013-06-03 12:51:44ncoghlansetrecipients: + ncoghlan, twouters, rhettinger, r.david.murray, skrah, Julian
2013-06-03 12:51:44ncoghlansetmessageid: <1370263904.88.0.902374192219.issue18111@psf.upfronthosting.co.za>
2013-06-03 12:51:44ncoghlanlinkissue18111 messages
2013-06-03 12:51:44ncoghlancreate