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

Josiah Carlson jcarlson at uci.edu
Mon Mar 5 20:10:58 CET 2007


Ka-Ping Yee <python-dev at zesty.ca> wrote:
> 
> At Guido's prompting, I drafted the following PEP.  How does it sound?
> 
> Title: Renaming iterator.next() to iterator.__next__()
> ======================================================

It sounds and reads just fine, though I'm -1 on the change if only
because 1) it adds a builtin, 2) it renames a protocol method, making it
potentially difficult and/or buggy to write forward or backward
compatible code, 3) it smells like gratuitous breakage.


 - Josiah



More information about the Python-3000 mailing list