iters on ints? (reducing the need for range/xrange)
phr-n2001d at nightsong.com
Fri Nov 9 13:29:11 CET 2001
Luigi Ballabio <ballabio at mac.com> writes:
> This said, while it makes sense in english to say "do this for every
> line IN this file", it just doesn't sound right to me to say "do this
> for every number IN 10"---even though I've been once familiar with the
> definitions of the set of all integers. I'd rather say "for every
> number UP TO 10" but that would mean introducing a new keyword which
> I'm not going to suggest, not me, sir.
Really the ellipsis should make an iterator: for i in 0...10.
More information about the Python-list