[Python-3000] PEP: rename it.next() to it.__next__(), add a next() built-in

Georg Brandl 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.

Georg

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: next.diff
Url: http://mail.python.org/pipermail/python-3000/attachments/20070306/cce9ec49/attachment.diff 


More information about the Python-3000 mailing list