[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
- 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 ]
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
- 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 ]