[Python-Dev] PEP 322: Reverse Iteration
fincher.8 at osu.edu
Tue Nov 4 19:57:33 EST 2003
On Tuesday 04 November 2003 06:44 pm, Guido van Rossum wrote:
> > for i, value in reversed(enumerate(listofnum)):
> Sorry, this doesn't work. enumerate() returns an iterator, reversed()
> requires a sequence.
I believe the assumption is that enumerate (as well as the proposed irange)
would grow an __reversed__ method to handle just that usage.
More information about the Python-Dev