Long integers, xrange and number theory

Terry Reedy tjreedy at udel.edu
Sat Dec 7 19:51:51 EST 2002


"Mark Edward Tristan Dickinson" <dickinsm at umich.edu> wrote in message
news:mailman.1039287989.13523.python-list at python.org...
> > def xxrange(start,stop): [name changed to look like xrange]
> >   while start < stop:
> >     yield start
> >     start += 1

> I guess that xxrange() is also less efficient than xrange()
> would be, though this doesn't bother me as much.

This would be an interesting test, especially if generators can be
Psyco-ized (ie, if the Psycho-ization propagates to the .next() method
of the returned generator object -- I simply do no know).  Re-calling
generators is more efficient than calling functions.

TJR





More information about the Python-list mailing list