iters on ints? (reducing the need for range/xrange)
mjackson at wrc.xerox.com
Fri Nov 9 13:40:42 CET 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,
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