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/008859.html below:

[Python-Dev] Lukewarm about range literals

[Python-Dev] Lukewarm about range literalsGreg Wilson gvwilson@nevex.com
Mon, 28 Aug 2000 18:04:41 -0400 (EDT)
> Thomas Wouters wrote:
> They are perfectly possible (in fact, more easily so than the current
> solution, if it hadn't already been written.) I like the elipsis
> syntax myself, but mostly because i have *no* use for elipses,
> currently. It's also reminiscent of the range-creating '..' syntax I
> learned in MOO, a long time ago ;)

I would vote -1 on [0...100:10] --- even range(0, 100, 10) reads better,
IMHO.  I understand Guido et al's objections to:

    for i in [:100]:

but in my experience, students coming to Python from other languages seem
to expect to be able to say "do this N times" very simply.  Even:

    for i in range(100):

raises eyebrows.  I know it's all syntactic sugar, but it comes up in the
first hour of every course I've taught...

Thanks,

Greg




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