iters on ints? (reducing the need for range/xrange)

Paul Rubin phr-n2001d at
Fri Nov 9 13:29:11 CET 2001

Luigi Ballabio <ballabio at> 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 mailing list