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

Mark Jackson mjackson at
Fri Nov 9 13:40:42 CET 2001

James_Althoff at writes:

> So under the proposed scenario, if one looks at 10 and asks "if 10 were to
> return an iterator, what would that iterator iterate over?", then it seems
> that range(10) would be a more *useful* answer than a sequence of one
> element 10.

So "for i in 10:" wouldn't, actually, include 10.

That's just Wrong, in a way that range(10) and [0:10] is not.  Bad idea,

also-opposed-to-the-"up_to_but_not_including"-keyword-ly yr's

Mark Jackson -
    After a recent trip to New York one French journalist remarked that
    leafing through a copy of /Forbes/ or /Fortune/ is like reading the
    operating manual of a strangely sanctimonious pirate ship.
					- Adam Gopnik

More information about the Python-list mailing list