iterator clone

Kay Schluehr kay.schluehr at
Tue Jul 15 10:11:05 CEST 2008

On 15 Jul., 08:16, Yosifov Pavel <b... at> wrote:

> cloning of iterators in this manner is bad, more good is to use one,
> single list(my_iter) instead of (see

This won't work for "big" iterators as mentioned by Peter Otten. With
this recipe you can't even clone generator objects ( which are
iterators ) that produce Fibonaccis in a lazy manner.

Regards, Kay

More information about the Python-list mailing list