[Python-Dev] Re: PEP 322: Reverse Iteration

Guido van Rossum guido at python.org
Tue Nov 4 18:29:06 EST 2003

>      iseq = irange(start, len(sq))
>      if godown: iseq = reversed(iseq)

But this wouldn't work, would it?  irange() is an iterator, but
reversed() only works for sequences (it refuses to secretly buffer the
whole thing).

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list