[Python-ideas] copyable iterators, named loops, continue a expression per indentation and a few functional things

Talin talin at acm.org
Sun Dec 24 08:32:07 CET 2006

Josiah Carlson wrote:
> Mathias Panzenböck <grosser.meister.morti at gmx.net> wrote:
>> Copyable iterators
>> ------------------
>> There are a few ways how you could implement this. However, it only makes sense for iterators, not
>> for generators!
> -1 on the entire proposal.  All iterators (and generators) are already
> copyable.  It's called list().

Actually, what he wants to be able to do is to 'tee' an iterator. 
However, we already have a 'tee' function in itertools that does just 
that. (And it works on generators too!)

-- Talin

More information about the Python-ideas mailing list