[Python-3000] Range literals (original) (raw)

Guido van Rossum guido at python.org
Thu Aug 10 20:05:51 CEST 2006


I haven't changed my mind. Do you really want to add atrocities such as having both .. and ... in the language where one includes the end point and the other excludes it? How would a casual user remember which is which?

--Guido

On 8/8/06, Josiah Carlson <jcarlson at uci.edu> wrote:

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. - Josiah


Python-3000 mailing list Python-3000 at python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-3000 mailing list