[Tutor] Why next vs. __next__ ?

python at bdurham.com python at bdurham.com
Tue Apr 22 01:14:31 CEST 2008


Is there a reason why generators have a special method named "next" vs.
"__next__"?

All other Python's special names have the double underscore
prefix/suffix.
http://docs.python.org/ref/specialnames.html

Are there other special names like "next" that don't have the double
underscore delimiters?

Thanks!
Malcolm


More information about the Tutor mailing list