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

[Python-Dev] Lukewarm about range literals

[Python-Dev] Lukewarm about range literals [Python-Dev] Lukewarm about range literalsBarry A. Warsaw bwarsaw@beopen.com
Tue, 29 Aug 2000 01:30:31 -0400 (EDT)
>>>>> "GE" == Greg Ewing <greg@cosc.canterbury.ac.nz> writes:

    GE> Ka-Ping Yee <ping@lfw.org>:

    >> for i in 1 .. 10: print i*i

    GE> That looks quite nice to me!

Indeed.

    >> for i in 0 ..! len(a): a[i] += 1

    GE> And that looks quite ugly. Couldn't it just as well be

    |     for i in 0 .. len(a)-1:
    |         a[i] += 1

    GE> and be vastly clearer?

I agree.  While I read 1 ..! 10 as "from one to not 10" that doesn't
exactly tell me what the sequence /does/ run to. ;)

-Barry



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