iterator clone
Kay Schluehr
kay.schluehr at gmx.net
Tue Jul 15 04:11:05 EDT 2008
On 15 Jul., 08:16, Yosifov Pavel <b... at ngs.ru> wrote:
> cloning of iterators in this manner is bad, more good is to use one,
> single list(my_iter) instead of (seehttp://aquagnu.blogspot.com/2008/07/self-repair-iterator-in-python.html).
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