[Python-3000] PEP: rename it.next() to it.next(), add a next() built-in (original) (raw)
Daniel Stutzbach daniel at stutzbachenterprises.com
Tue Mar 6 22:03:11 CET 2007
- Previous message: [Python-3000] PEP: rename it.next() to it.__next__(), add a next() built-in
- Next message: [Python-3000] PEP: rename it.next() to it.__next__(), add a next() built-in
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-3000] PEP: rename it.next() to it.__next__(), add a next() built-in
- Next message: [Python-3000] PEP: rename it.next() to it.__next__(), add a next() built-in
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]