Itertools

Ronald Legere legere at ll.mit.edu
Tue Jul 29 08:32:14 EDT 2003


The new itertools stuff is pretty cool. One thing that bothers me though is
that
there seems to be no way to copy an iterator. How does one work around this?
Is
there a trick that I am missing?

Without being able to 'split' an iterator, I can't
think of how to do some of the cool things you can do with lazy lists in
Haskell. It seems
quite often you want to be able to do this 'splitting', and if I
had more coffee I would post an example :) The ones I
can think of are also defined recursively, which is another kettle of fish.

 But I hope that someone knows
what I am talking about and has thought of a way...
Cheers!







More information about the Python-list mailing list