Pre-PEP: reverse iteration methods
s.keim at laposte.net
Wed Sep 24 09:42:33 CEST 2003
> PEP: 323
> Title: Add Reverse Iteration Methods
> Version: $Revision: 1.1 $
I don't need this often enough to want it as a method or a builtin
But it would ne nice to have a function in the itertool module.
I would call it riter(), it should work on any sequence with len()
support or on any object wich define the __riter__ special method.
In practice, I mostly use reverse iteration when I most remove some
few objects on the sequence I'm itering to, so I have more neeed for a
for index, value in itertools.renumerate(sequence):
if not value:
More information about the Python-list