[Python-3000] PEP: rename it.next() to it.__next__(), add a next() built-in
g.brandl at gmx.net
Tue Mar 6 21:49:20 CET 2007
Guido van Rossum schrieb:
> Having now read this entire thread I am going to accept Ping's PEP.
> Adding the sentinel argument to the next() builtin was what did it for
> me: it neatly solves the problem if having to catch that StopIteration
> in 99% of the cases.
Attached is a possible implementation for the next() function, regardless
of how the next method is going to be called in the future.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Python-3000