PEP 276 Simple Iterator for ints (fwd)
David Eppstein
eppstein at ics.uci.edu
Wed Nov 14 19:11:06 EST 2001
In article <mailman.1005779239.17748.python-list at python.org>,
James_Althoff at i2.com wrote:
> If not 3), then there is the issue of having to do an extra computation for
> the common case of indexing a sequence as in, e.g.,
>
> for i in 0 .. len(sequence)-1:
This is very common in C, but is it so common in Python?
Isn't it usually more idiomatic to do
for item in sequence
?
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list