Guido van Rossum wrote:

But it's been answered already -- we can't change the meaning of
StopIteration() with a value unequal to None, so it has to be a
separate exception, and it should not derive from StopIteration.

How about having StopIteration be a subclass of the
new exception? Then things that want to get generator
return values only have one exception to catch, and
things that only know about StopIteration will fail
to catch the new exception.

--
Greg

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

Reply via email to