Re: Pre-PEP: reverse iteration methods
> PEP: 323[color=blue]
> Title: Add Reverse Iteration Methods
> Version: $Revision: 1.1 $[/color]
I don't need this often enough to want it as a method or a builtin
function.
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
renumerate() function:
for index, value in itertools.renum erate(sequence) :
if not value:
del sequence(index)
> PEP: 323[color=blue]
> Title: Add Reverse Iteration Methods
> Version: $Revision: 1.1 $[/color]
I don't need this often enough to want it as a method or a builtin
function.
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
renumerate() function:
for index, value in itertools.renum erate(sequence) :
if not value:
del sequence(index)
Comment