iters on ints? (reducing the need for range/xrange)
Mark Jackson
mjackson at wrc.xerox.com
Fri Nov 9 07:40:42 EST 2001
James_Althoff at i2.com 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,
IMO.
also-opposed-to-the-"up_to_but_not_including"-keyword-ly yr's
--
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
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