PEP 322: Reverse Iteration (REVISED, please comment)
Werner Schiendl
n17999950.temp.werner at neverbox.com
Wed Oct 29 05:58:29 EST 2003
Alex Martelli wrote:
> Werner Schiendl wrote:
> ...
>>Another possibility would be to have a static method for iter:
>>
>>for elem in iter.reversed(sed):
>> print elem
>>
>
> I like this one! Another advantage is, one fewer built-in.
>
> Problem is, iter is currently a built-in function, not a type...
>
An additional advantage that came to my mind is that it would fit
Guido's preference about how to (possible) implement inline sort.
having
L = list.sorted(seq)
i = iter.reversed(seq)
seems very consistent to me.
best regards
Werner
More information about the Python-list
mailing list