Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Strange range Date: Sun, 3 Apr 2016 17:10:42 +1000 Lines: 18 Message-ID: References: <87y48xjwqq.fsf@elektro.pacujo.net> <56fe76f2$0$22141$c3e8da3$5496439d@news.astraweb.com> <87lh4xjt37.fsf@elektro.pacujo.net> <1671ea2b-09ff-4745-a6e7-d2c57864cba3@googlegroups.com> <87zitbpwpr.fsf@elektro.pacujo.net> <87vb3zpu49.fsf@elektro.pacujo.net> <87shz3p4a5.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de w1mvuUahAzmpWaaeOrRlSwX4oEkix30wFESbLPxvDGDA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'meaningful': 0.09; 'python': 0.10; '(but': 0.15; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iterable': 0.16; 'iterator': 0.16; 'iterator.': 0.16; 'object).': 0.16; 'py3': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'uniquely': 0.16; 'xrange': 0.16; 'wrote:': 0.16; 'exists': 0.18; 'library,': 0.18; 'library': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'not,': 0.22; 'saying': 0.22; 'header :In-Reply-To:1': 0.24; "doesn't": 0.26; 'message- id:@mail.gmail.com': 0.27; 'object,': 0.27; 'innovation.': 0.29; 'another': 0.32; 'functional': 0.32; 'language.': 0.32; 'returned': 0.32; 'point': 0.33; 'received:google.com': 0.35; 'but': 0.36; 'list,': 0.36; 'received:209.85': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'received:209.85.213': 0.37; 'release': 0.37; 'seem': 0.37; 'itself': 0.38; 'no,': 0.38; 'received:209': 0.38; 'anything': 0.38; 'does': 0.39; 'chrisa': 0.84; 'conservative': 0.84; 'received:209.85.213.194': 0.84; 'reliability': 0.84; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=VZAhdeYbZA83aY00eaVPFp1LNEAUwcs32Mm+qWteOPI=; b=yJCEBhLYCWtBn1+hI+dhDN4NC3o9Si4RgvQ9DzWlRGCs8/Fs/ASzQbnmIODhsXwUV7 P9Cr8ClQTBwDLgTmkUh601g7QpVYnVGBjL9w2SKFSXdisM3sPeUQZRoP0nIkwoqr8IlL uH0Fx/3z89SdA51rzM7LKQHyGY7bKQkWfiWMxHw9MiT6vB1hI8sNadPAKAGT0qt0O79h fwFgZoUksQpOsSfrTWh4bLQvgSwSrPmYewr8b+lJ305qme+rgLlNfQXZXofcrTcaJ4sY luCVa13/MsJGVkaIHxxCCJLmG5vcaJKg9tidAAzVjVPu2Lv0SYInbfSeaRn/yCYVN4+y 9XUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=VZAhdeYbZA83aY00eaVPFp1LNEAUwcs32Mm+qWteOPI=; b=iK3q7q37kBTfD7b/+dV7Hetz9rH4EdVWPYRlKe7cRB96EaZ2CGSCcuWzvP72sxc/Fx YHYXvkH1M2sa0492j0LHgX8RvB767YXQth1m2QHWXzvAcSmIwFCXJQ6KMA8zaqPqlXtE VMiQ6blfdquuZ6BoCXEYurD2lw2QJjJPmle1Yki/2ZXRgBoI4AH2yFcZ9FQJqj347SyC QytIDQUOi4fnioHxHWpqKA2N1Nuz8RRUBhSl5he1fZF/chv2UbEOKqQharQGCqAqc+5E jsx5r2on1t/LaRmt02r6fRT5o20DnZwPS5kwjEtCfKRhvdGcAxgpo+dEpsHh5jaE0+fM EfLQ== X-Gm-Message-State: AD7BkJKC1iH19eTwLoRPxCeXuL4xJcGaNyLnIIByUovdVV7QdFQB/OZcR8Jo5EOc8612qhw3jLkounjLLqGIYw== X-Received: by 10.107.63.139 with SMTP id m133mr1531266ioa.157.1459667442796; Sun, 03 Apr 2016 00:10:42 -0700 (PDT) In-Reply-To: <87shz3p4a5.fsf@elektro.pacujo.net> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:106354 On Sun, Apr 3, 2016 at 4:58 PM, Marko Rauhamaa wrote: >> That a use exists in the standard library, or that one does not, >> doesn't really tell you anything meaningful about Python itself or >> good practices with the language. The standard library is under >> uniquely conservative constraints that enshrine compatibility and >> reliability from one point release to another over any kind of >> innovation. > > What you seem to be saying is that range() used to be an iterator but > has since ascended to the status of an iterable. No, range() has never returned an iterator. In Python 2, it returned a list, which is iterable. In Python 3, it returns a range object, which is iterable. And in Python 2, xrange returns an xrange object, which is also iterable (but less functional than the Py3 range object). None of these is an iterator. ChrisA