[Python-3000] Range literals
jcarlson at uci.edu
Tue Aug 8 19:44:17 CEST 2006
Talin <talin at acm.org> wrote:
> I've seen some languages that use a double-dot (..) to mean a range of
> items. This could be syntactic sugar for range(), like so:
> for x in 1..10:
In the pronouncement on PEP 284: http://www.python.org/dev/peps/pep-0284/
Guido did not buy the premise that the range() format needed fixing,
"The whole point (15 years ago) of range() was to *avoid* needing syntax
to specify a loop over numbers. I think it's worked out well and there's
nothing that needs to be fixed (except range() needs to become an
iterator, which it will in Python 3.0)."
Unless Guido has decided that range/xrange are the wrong way to do
things, I don't think there is much discussion here.
More information about the Python-3000