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

Josiah Carlson jcarlson at uci.edu
Wed Mar 7 23:48:15 CET 2007


"Guido van Rossum" <guido at python.org> wrote:
> Since next() is equivalent to send(None) we don't really need the
> next() method do we?

As long as its renamed to __next__, then we seemingly wouldn't need next,
though users needing to use next(X) or X.send(None) instead of X.next(),
may be confusing and inconvenient.  Should send get a default value of
None?


 - Josiah



More information about the Python-3000 mailing list