PEP 255: Simple Generators

David S. Harrison daha at
Fri Jun 15 15:07:23 EDT 2001

This is an awesome PEP.  I have used Icon extensively in the past
and I have found generators to be very useful and elegant.  It was
not exactly clear in the proposal, but will it be possible to
enumerate elements outside of the "for" idiom?  Sometimes it
is useful to get elements out of a generator in different parts
of a program.  For example, the first few elements might be consumed
by one function, and the next by another.  Is this possible under
PEP 255?

			David S. Harrison
			(daha at

More information about the Python-list mailing list