Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #89829

Re: l = range(int(1E9))

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!lightspeed.eweka.nl!lightspeed.eweka.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.039
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'great.': 0.07; 'method,': 0.09; 'sure,': 0.09; 'iterator': 0.16; 'loops': 0.16; 'reedy': 0.16; 'xrange': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'pointed': 0.19; 'header:In-Reply-To:1': 0.27; 'originally': 0.30; 'then.': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'implemented': 0.33; 'except': 0.35; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; "didn't": 0.36; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'realize': 0.39; 'to:addr:python.org': 0.39; 'ian': 0.60; 'introduced': 0.61; 'back': 0.62; '2015': 0.84; 'old.': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=MZSJIsYc4oBZPiL973035X708RFgqem4LXTuBs0sZjI=; b=YSeWUtLGmgZe6Sr22ZyWAI8sBtfT+2zYooxRj5tXrQLtKCrsLeRiM8/UNsrpX3jQev VZsfZ9NyIVjZzIw6kqaUho0NvmAnIT9LGTxy52ApKw+jpvA1UMO8MDilg5L7wEVrkdZ/ yajPiarGYPDBDTCc4QPAbXvGKn1BytGQt1+L0MAlIVLhbrUGXY2k5Tm6+dFNEtluRoSq VIKlImXuGeyw/BNkU4WPYCTrH+IlfbRalrUoRuScAVsMmTEZg3CIzTGxNC42wy43MmRN zfjD2Rvc8khDd824j1nmx3gMaVtQMkVoFA5Hz7ecJgWP54GFg6elaslHNlgxbtqQJiqV iz+A==
X-Received by 10.107.12.158 with SMTP id 30mr6891640iom.61.1430628723216; Sat, 02 May 2015 21:52:03 -0700 (PDT)
MIME-Version 1.0
In-Reply-To <mi3nv3$l35$1@ger.gmane.org>
References <87k2wtvbx1.fsf@Equus.decebal.nl> <slrnmk4nmp.apd.jon+usenet@frosty.unequivocal.co.uk> <mailman.136.1430414427.3680.python-list@python.org> <W061x.692563$396.195269@fx12.am4> <mailman.12.1430581268.12865.python-list@python.org> <_M61x.477467$Ek.357048@fx07.am4> <mailman.15.1430584786.12865.python-list@python.org> <bN81x.386497$G53.218869@fx13.am4> <mailman.23.1430594149.12865.python-list@python.org> <CV91x.402510$zE7.111881@fx40.am4> <CALwzidnAGmimhH_Kztt6KA6x+WLnA6M-WjrZvEzGEj7Xxr0VmQ@mail.gmail.com> <mi3nv3$l35$1@ger.gmane.org>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Sat, 2 May 2015 22:51:22 -0600
Subject Re: l = range(int(1E9))
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.46.1430628725.12865.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1430628725 news.xs4all.nl 2946 [2001:888:2000:d::a6]:45226
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3958
X-Received-Body-CRC 3632665959
Xref csiph.com comp.lang.python:89829

Show key headers only | View raw


On Sat, May 2, 2015 at 5:51 PM, Terry Reedy <tjreedy@udel.edu> wrote:
> On 5/2/2015 5:31 PM, Ian Kelly wrote:
>
>> Would it have been better if range() had been implemented as xrange()
>> from the beginning? Sure, that would have been great. Except for one
>> small detail: the iterator protocol didn't exist back then.
>
>
> For loops originally used the getitem iterator protocol. xrange objects have
> a __getitem__ method, but not __iter__ or __next__.  As Mark pointed out,
> they were introduced in 1993.

I'm aware of getitem iterators; just didn't realize that xrange used
it or was that old.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-04-30 18:06 +0200
  Re: l = range(int(1E9)) Grant Edwards <invalid@invalid.invalid> - 2015-04-30 16:33 +0000
    Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-04-30 19:26 +0200
      Re: l = range(int(1E9)) Ben Finney <ben+python@benfinney.id.au> - 2015-05-01 03:41 +1000
        Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-04-30 20:44 +0200
    Re: l = range(int(1E9)) Roel Schroeven <roel@roelschroeven.net> - 2015-04-30 21:40 +0200
  Re: l = range(int(1E9)) Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2015-04-30 16:55 +0000
    Re: l = range(int(1E9)) Ben Finney <ben+python@benfinney.id.au> - 2015-05-01 03:20 +1000
      Re: l = range(int(1E9)) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-01 15:20 +1000
        Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-05-01 08:08 +0200
      Re: l = range(int(1E9)) BartC <bc@freeuk.com> - 2015-05-02 16:26 +0100
        Re: l = range(int(1E9)) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-02 16:40 +0100
          Re: l = range(int(1E9)) BartC <bc@freeuk.com> - 2015-05-02 17:17 +0100
            Re: l = range(int(1E9)) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-02 17:39 +0100
              Re: l = range(int(1E9)) BartC <bc@freeuk.com> - 2015-05-02 19:34 +0100
                Re: l = range(int(1E9)) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-02 20:15 +0100
                Re: l = range(int(1E9)) Marko Rauhamaa <marko@pacujo.net> - 2015-05-02 22:26 +0300
                Re: l = range(int(1E9)) BartC <bc@freeuk.com> - 2015-05-02 20:51 +0100
                Re: l = range(int(1E9)) Joel Goldstick <joel.goldstick@gmail.com> - 2015-05-02 17:21 -0400
                Re: l = range(int(1E9)) Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-02 15:31 -0600
                Re: l = range(int(1E9)) Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2015-05-02 21:40 +0000
                Re: l = range(int(1E9)) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-02 23:26 +0100
                Re: l = range(int(1E9)) BartC <bc@freeuk.com> - 2015-05-02 23:33 +0100
                Re: l = range(int(1E9)) Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2015-05-03 00:13 +0000
                Re: l = range(int(1E9)) Michael Torrie <torriem@gmail.com> - 2015-05-02 20:07 -0600
                Re: l = range(int(1E9)) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-03 03:16 +0100
                Re: l = range(int(1E9)) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-03 21:16 +1000
                Re: l = range(int(1E9)) Chris Angelico <rosuav@gmail.com> - 2015-05-03 21:30 +1000
                Re: l = range(int(1E9)) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-03 19:36 +0100
                Re: l = range(int(1E9)) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-03 21:15 +1000
                Re: l = range(int(1E9)) Chris Angelico <rosuav@gmail.com> - 2015-05-03 21:29 +1000
                Re: l = range(int(1E9)) Terry Reedy <tjreedy@udel.edu> - 2015-05-02 19:26 -0400
                Re: l = range(int(1E9)) Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2015-05-03 00:01 +0000
                Re: l = range(int(1E9)) Terry Reedy <tjreedy@udel.edu> - 2015-05-02 23:18 -0400
                Re: l = range(int(1E9)) Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2015-05-03 03:40 +0000
                Re: l = range(int(1E9)) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-03 21:05 +1000
                Re: l = range(int(1E9)) Terry Reedy <tjreedy@udel.edu> - 2015-05-02 19:51 -0400
                Re: l = range(int(1E9)) Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-02 22:51 -0600
                Re: l = range(int(1E9)) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-03 21:21 +1000
                Re: l = range(int(1E9)) Marko Rauhamaa <marko@pacujo.net> - 2015-05-02 22:15 +0300
            Re: l = range(int(1E9)) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-03 20:32 +1000
              Re: l = range(int(1E9)) Chris Angelico <rosuav@gmail.com> - 2015-05-03 20:59 +1000
        Re: l = range(int(1E9)) Terry Reedy <tjreedy@udel.edu> - 2015-05-02 18:41 -0400
    Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-04-30 19:28 +0200
  Re: l = range(int(1E9)) Terry Reedy <tjreedy@udel.edu> - 2015-04-30 13:02 -0400
  Re: l = range(int(1E9)) Gary Herron <gherron@digipen.edu> - 2015-04-30 10:05 -0700
    Re: l = range(int(1E9)) Rob Gaddi <rgaddi@technologyhighland.invalid> - 2015-04-30 17:12 +0000
      Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-04-30 20:50 +0200
        Re: l = range(int(1E9)) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-04-30 21:53 +0100
          Re: l = range(int(1E9)) ElChino <elchino@cnn.cn> - 2015-04-30 23:23 +0200
            Re: l = range(int(1E9)) Chris Angelico <rosuav@gmail.com> - 2015-05-01 08:45 +1000
              Re: l = range(int(1E9)) ElChino <elchino@cnn.cn> - 2015-05-01 01:03 +0200
            Re: l = range(int(1E9)) Ben Finney <ben+python@benfinney.id.au> - 2015-05-01 09:12 +1000
              Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-05-01 07:04 +0200
                Re: l = range(int(1E9)) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-01 13:15 +0200
                Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-05-01 14:22 +0200
                Re: l = range(int(1E9)) Terry Reedy <tjreedy@udel.edu> - 2015-05-01 22:00 -0400
            Use ‘python2’ or ‘python3’, explicit is better than implicit  (was: l = range(int(1E9))) Ben Finney <ben+python@benfinney.id.au> - 2015-05-01 09:19 +1000
              Re: Use 'python2' or 'python3', explicit is better than implicit  (was: l = range(int(1E9))) Rustom Mody <rustompmody@gmail.com> - 2015-04-30 19:24 -0700
            Re: l = range(int(1E9)) Chris Angelico <rosuav@gmail.com> - 2015-05-01 09:23 +1000
          Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-05-01 06:19 +0200
            Re: l = range(int(1E9)) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-01 05:41 +0100
            Re: l = range(int(1E9)) Michael Torrie <torriem@gmail.com> - 2015-05-01 07:25 -0600
              Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-05-01 16:12 +0200
  Re: l = range(int(1E9)) Gisle Vanem <gvanem@yahoo.no> - 2015-04-30 20:23 +0200
    Re: l = range(int(1E9)) alister <alister.nospam.ware@ntlworld.com> - 2015-04-30 18:48 +0000
      Re: l = range(int(1E9)) Dave Angel <davea@davea.name> - 2015-04-30 14:59 -0400
        Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-04-30 22:18 +0200
          Re: l = range(int(1E9)) Tim Chase <python.list@tim.thechases.com> - 2015-04-30 16:41 -0500
            Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-05-01 07:19 +0200
  Re: l = range(int(1E9)) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-01 14:42 +1000
    Re: l = range(int(1E9)) Cecil Westerhof <Cecil@decebal.nl> - 2015-05-01 07:13 +0200
    Re: l = range(int(1E9)) Tony the Tiger <tony@tiger.invalid> - 2015-05-02 21:28 +0000
      Re: l = range(int(1E9)) Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-02 15:32 -0600
      Re: l = range(int(1E9)) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-03 20:56 +1000

csiph-web