A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/008892.html below:

[Python-Dev] Lukewarm about range literals

[Python-Dev] Lukewarm about range literals [Python-Dev] Lukewarm about range literalsGuido van Rossum guido@beopen.com
Tue, 29 Aug 2000 11:37:40 -0500
> How about a:b to indicate the range starting at a and ending with b-1?

I believe this is what the Nummies originally suggested.

> which doesn't look so bad to me, but is probably ambiguous.  Hmmm,
> could this possibly work or is it too much of a collision with the use
> of `:' to indicate block structure?

Alas, it could never work.  Look at this:

  for i in a:b:c

Does it mean

  for i in (a:b) : c

or

  for i in a: (b:c)

?

So we're back to requiring *some* form of parentheses.

I'm postponing this discussion until after Python 2.0 final is
released -- the feature freeze is real!

--Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4