Why I think range is a wart.

James_Althoff at i2.com James_Althoff at i2.com
Wed Mar 13 14:00:44 EST 2002


[David Eppstein]
> Perhaps we should use
>     for (i,x) in list.iteritems(): ...
> (analogous to dictionaries) instead of PEP 279's indexed(list).

That would be my vote, too.

Of course, being not fond of "range(len(", I would throw in list.iterkeys()
or list.iterindices() -- or whatever name -- also.

jim





More information about the Python-list mailing list