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


Groups > comp.lang.python > #78097

Re: Is there a canonical way to check whether an iterable is ordered?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!newsfeed.freenet.ag!newsfeed.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.023
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'subject:iterable': 0.09; 'yeah,': 0.09; 'cc:addr:python-list': 0.11; 'itself.': 0.14; 'dict': 0.16; 'effect,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iterates': 0.16; 'iterating': 0.16; 'iteration': 0.16; 'iterator': 0.16; 'reedy': 0.16; 'say.': 0.16; 'sequence,': 0.16; 'them...': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'basically': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; 'sep': 0.31; 'yields': 0.31; 'received:google.com': 0.35; 'sequence': 0.36; "didn't": 0.36; 'subject:?': 0.36; 'anything': 0.39; 'realize': 0.39; 'how': 0.40; 'till': 0.61; 'new': 0.61; "you're": 0.61; 'forward': 0.65; '20,': 0.68; 'subject:there': 0.68; 'bag': 0.74; 'collection.': 0.84; 'dict.': 0.84; 'heh.': 0.84; 'subject:check': 0.84; 'to:none': 0.92
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 :content-type; bh=MPhZITVt768fuF8C+D6cBZJjF56qilhIpCa9nzEMgGo=; b=NyTmhXemhOaqqgIa8bao6dMJnXwVq4RBSo3tCdqivTgT4SNfzXhzPeRTGS5/qp0FJK OnbxPNWuYPWRqbeVWwg8Ttt9v6zgirGK5Ep0EHTeAdYKTeB8+DHictLexrVMd88xryHO amNREXXACC2Oe6o1HmcgmRM3mCoJLhHXVhmBkRgA8LT5Jc9WJk5b+97wQIjMRQIIsljg mJ/pUU/d4zUtmTXY8PaXS11wd+oeoY+bYGWR80ForiRdNlDG5NKkGnZHyi+D8kgCY5RK R5leQAkM2JbWgCeOvkFHNPcXVxoSR6Cx3AAAhh+xHzypzGPuYEMoIVXJTQsUVU5hVzQ7 9DVw==
MIME-Version 1.0
X-Received by 10.50.117.65 with SMTP id kc1mr1134367igb.34.1411189287585; Fri, 19 Sep 2014 22:01:27 -0700 (PDT)
In-Reply-To <lvi978$civ$1@ger.gmane.org>
References <efcc61e6-f132-4f14-80b5-0536816b6c7b@googlegroups.com> <mailman.14101.1411042251.18130.python-list@python.org> <roy-E21095.08580518092014@news.panix.com> <mailman.14103.1411047208.18130.python-list@python.org> <roy-7E9ED1.19515818092014@news.panix.com> <CAPTjJmqVLtvx0495NF2BA8tFffHZpqEcvDkRV35zFX-Yu=DWbQ@mail.gmail.com> <lvi978$civ$1@ger.gmane.org>
Date Sat, 20 Sep 2014 15:01:27 +1000
Subject Re: Is there a canonical way to check whether an iterable is ordered?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.14161.1411189295.18130.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1411189295 news.xs4all.nl 2860 [2001:888:2000:d::a6]:53052
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:78097

Show key headers only | View raw


On Sat, Sep 20, 2014 at 8:02 AM, Terry Reedy <tjreedy@udel.edu> wrote:
>> That's what you're iterating over - not the bag itself.
>
> If one iterates over anything other that a sequence, in forward order, then
> one is, in effect, iterating over a new sequence generated from the 'base'
> collection.  In particular, set and dict iteration iterates over an
> arbitrary serialization of the set or dict.

Yeah, that's basically what I was trying to say. Didn't realize how
empty the statement was till you dug deeper into it, heh. Yes, an
iterator yields the items it yields, in the order it yields them...
*twiddles thumbs*

ChrisA

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


Thread

Is there a canonical way to check whether an iterable is ordered? cool-RR <ram.rachum@gmail.com> - 2014-09-18 04:55 -0700
  Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-18 22:10 +1000
    Re: Is there a canonical way to check whether an iterable is ordered? Roy Smith <roy@panix.com> - 2014-09-18 08:58 -0400
      Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-18 23:33 +1000
        Re: Is there a canonical way to check whether an iterable is ordered? Roy Smith <roy@panix.com> - 2014-09-18 19:52 -0400
          Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-19 12:45 +1000
          Re: Is there a canonical way to check whether an iterable is ordered? Terry Reedy <tjreedy@udel.edu> - 2014-09-19 18:02 -0400
          Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-20 15:01 +1000
      Re: Is there a canonical way to check whether an iterable is ordered? Terry Reedy <tjreedy@udel.edu> - 2014-09-18 09:46 -0400
      Re: Is there a canonical way to check whether an iterable is ordered? Tim Chase <python.list@tim.thechases.com> - 2014-09-18 09:32 -0500
      Re: Is there a canonical way to check whether an iterable is ordered? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-19 15:15 +1000
        Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-19 15:40 +1000
          Re: Is there a canonical way to check whether an iterable is ordered? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-19 20:59 +1000
            Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-19 21:19 +1000
              Re: Is there a canonical way to check whether an iterable is ordered? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-19 21:58 +1000
                Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-19 22:06 +1000
            Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-19 21:25 +1000
              Re: Is there a canonical way to check whether an iterable is ordered? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-19 21:46 +1000
                Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-19 21:56 +1000
                Re: Is there a canonical way to check whether an iterable is ordered? alister <alister.nospam.ware@ntlworld.com> - 2014-09-19 12:26 +0000
                Re: Is there a canonical way to check whether an iterable is ordered? Chris Angelico <rosuav@gmail.com> - 2014-09-19 22:36 +1000
  Re: Is there a canonical way to check whether an iterable is ordered? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-19 15:04 +1000

csiph-web