At 01:18 PM 5/6/2005 -0700, Guido van Rossum wrote:
>There's one alternative possible (still orthogonal to PEP 340):
>instead of __next__(), we could add an optional argument to the next()
>method, and forget about the next() built-in. This is more compatible
>(if less future-proof). Old iterators would raise an exception when
>their next() is called with an argument, and this would be a
>reasonable way to find out that you're using "continue EXPR" with an
>iterator that doesn't support it. (The C level API would be a bit
>hairier but it can all be done in a compatible way.)

+1.

_______________________________________________
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