[Python-3000] PEP: rename it.next() to it.next(), add a next() built-in (original) (raw)
Georg Brandl g.brandl at gmx.net
Tue Mar 6 21:49:20 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 ]
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
- 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 ]