iterating in reverse

Michael Hudson mwh at
Fri Jan 17 12:19:49 CET 2003

Erik Max Francis <max at> writes:

> If you expect they'll always be pretty small, then range will be
> perform better (in terms of speed).

I believe Raymond Hettinger got sufficiently annoying with this being
pointed out <wink> that this will no longer be true in 2.3.  From the
whatsnew document:

  xrange() objects now have their own iterator, making for i in
  xrange(n) slightly faster than for i in range(n). (Patch by Raymond


  Worryingly, DEFUN appears to be a function that removes all the
  fun from something: after using it all your code is converted 
  to C++.                              -- Tim Bradshaw, comp.lang.lisp

More information about the Python-list mailing list