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

Ka-Ping Yee python-dev at zesty.ca
Mon Mar 5 20:07:52 CET 2007


One possibility for making a next() built-in more useful:

    Just like getattr, two-argument next(iter, sentinel)
    returns sentinel if StopException is caught.

If you've used .next() explicitly, would this be handy?

(Or, what convenience would you want in a next() builtin?)


-- ?!ng


More information about the Python-3000 mailing list