Adam Olsen wrote:
However, since the genexp considers all improper ones to be in error,
it could wrap them with a RuntimeError and pass it through .next()
instead.

Would you do that only for genexps, or for generators
in general?

The current behaviour seems to be that if you explicitly
raise StopIteration in a generator, the generator then
considers itself to be exhausted (i.e. all subsequent
calls to next() raise StopIteration as well).

Is that behaviour deliberate? If so, do the reasons for
it also apply to genexps?

--
Greg
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to