[Python-3000] PEP: rename it.next() to it.__next__(), add a next() built-in
daniel at stutzbachenterprises.com
Tue Mar 6 22:03:11 CET 2007
On 3/6/07, Brett Cannon <brett at python.org> wrote:
> http://docs.python.org/dev/api/type-structs.html#l2h-1017 doesn't say
> that a NULL return can be used as a signal that iterator is exhausted
> without raising StopIteration. That would mean the above could be
> simplified somewhat in terms of return value checking.
FWIW, PEP 234 states that the end of iteration can also be signaled by
returning NULL without an exception set.
Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC
More information about the Python-3000