[docs] [issue14836] Add next(iter(o)) to set.pop, dict.popitem entries.

Terry J. Reedy report at bugs.python.org
Mon May 21 01:53:28 CEST 2012

Terry J. Reedy <tjreedy at udel.edu> added the comment:

Raymond, I pretty much agree with your points and would be happy either with rejection or one simple sentence.  This idiom really belongs in a hypothetical how-to, such as 'Python iterators and generators'. The real use case for it=iter() followed by next(it) it to treat the first item of a collection specially before scanning the rest in a for loop.


Python tracker <report at bugs.python.org>

More information about the docs mailing list