[Greg Ewing] >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: counter=itertools.counter(1); counter())? Raymond > >> 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. > >-- >Greg >_______________________________________________ >Python-3000 mailing list >Python-3000@python.org >http://mail.python.org/mailman/listinfo/python-3000 >Unsubscribe: >http://mail.python.org/mailman/options/python-3000/python%40rcn.com _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com