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

Georg Brandl g.brandl at gmx.net
Wed Mar 7 01:21:57 CET 2007


Ka-Ping Yee schrieb:
> On Tue, 6 Mar 2007, Guido van Rossum wrote:
>> 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.
> 
> Okay, this is checked in as PEP 3114.

Patch is at http://python.org/sf/1675363.

Georg



More information about the Python-3000 mailing list