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

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 5 23:16:08 CET 2007


Barry Warsaw wrote:

OTOH, making iterators callable as equivalent to .next() as I think Raymond suggested sounds about perfect. You get next(), plus explicit iteration with no additional built in necessary.

But that would raise the question of why next wasn't called call instead.

Also I'm not sure I like this idea. It smells like an abuse of the notion of calling to me. One doesn't normally expect that calling a callable object has a side effect on the callable itself.

-- Greg



More information about the Python-3000 mailing list