[Python-3000] Fwd: Re: rename it.next() to it.__next__(), add a next() built-in
python at rcn.com
Tue Mar 6 00:35:14 CET 2007
>Invoking a builtin .next() method via a protocol
>function shouldn't be any slower than it is now.
>In both cases you've got one name lookup and one
>Python call, after which you go through the type
>slot directly to a C function.
Do you expect that next(someiterator) will be just
as fast and calling a boundmethod (such as:
>> It is then fairly
>> standard to factor out the attribute lookup with with 'xnext = x.next'
>You could still do xnext = x.__next__ if you wanted.
>Python-3000 mailing list
>Python-3000 at python.org
More information about the Python-3000