On Tue, 15 Jul 2008 19:54:30 -0700, Yosifov Pavel wrote: > Kay, can you show example of such generator? ReIter, for example, work > with usual generators. > > But for "big" iterator, I think is no any good solutions. IMHO we can > discern 2 types of iterators: re-startable (based on internal Python > objects) and not re-startable (with an external state, side- > effects)...
Has nothing to do with internal vs. external. Examples: ``itertools.count(1)``, ``itertools.cycle(iterable)``, or def fib(): a, b = 0, 1 while True: yield a a, b = b, a + b Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list