[Python-3000] PEP: rename it.next() to it.next(), add a next() built-in (original) (raw)
Ka-Ping Yee python-dev at zesty.ca
Tue Mar 6 00:03:48 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 ]
On Mon, 5 Mar 2007, Josiah Carlson wrote:
"Guido van Rossum" <guido at python.org> wrote: > On 3/5/07, Josiah Carlson <jcarlson at uci.edu> wrote: However, I have written methods named 'next' which have nothing to do with the iterator protocol.
This is exactly why the iterator protocol method should be named next: so it can't collide with method names used for other purposes.
The translator will be imperfect, and probably will need some guidance to do its work correctly. But the problem you point out here is an issue primarily with the language, not the translator, and Python 3.0 is a good opportunity for incompatible changes like this that will future-proof the language.
-- ?!ng
- 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 ]