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


Groups > comp.lang.python > #86846

Re: Sort list of dictionaries

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <jsf80238@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.033
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'indeed,': 0.09; 'valueerror:': 0.09; 'will,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '54,': 0.16; 'address)': 0.16; 'subject:Sort': 0.16; 'subject:dictionaries': 0.16; 'tempfile': 0.16; 'component': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'module': 0.19; 'file,': 0.19; '>>>': 0.22; 'example': 0.22; 'rules': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'skip:" 40': 0.26; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; 'chris': 0.29; 'am,': 0.29; 'especially': 0.30; 'subject:list': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'asked': 0.31; 'easier': 0.31; '"",': 0.31; 'yesterday': 0.31; 'file': 0.32; 'another': 0.32; '(most': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'addresses,': 0.36; 'module.': 0.36; 'doing': 0.36; 'recent': 0.39; 'expect': 0.39; 'does': 0.39; 'sure': 0.39; 'how': 0.40; 'is.': 0.60; 'worry': 0.60; 'numbers': 0.61; 'address': 0.63; 'temporary': 0.65; 'mar': 0.68; 'overcome': 0.74; 'guaranteed': 0.75; '2015': 0.84; 'mistaken': 0.84; 'colleague': 0.91; '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=F3Wfmg5mmMJvmzd+vZ25IU5g2C19MpIeVGJ0MwZOA1c=; b=Hxzc4ieGKmSlahI0l2ipNClQzEFcSnWIeaqI8+LrEB+gC7Q+NRG6D2CScaqPuN6P3f 5LaYzb3MTFf27Y3ypr2wHiVq+1ASh5jTNPsvoePz9EHCwfXpmtM7yh66hogx0PCTs8tF Ny+eIFoxKTWCsLGfb3//sExSoKD1S5R2BIwqRpPT/cKIfG2dNZjtrODqVM4vssFHVL6c 1+s24k12E6eCvmqQLZXCbxgw4CRBmHFeJCaE9JX/yLMXRgl25l4Jiz4It7emOaR5uoti 2YZl8AA1ObRpzr4e4EOWvXrr5o46KzqqCKzI6ZRiwtVeQBLy9kdE5m9OEq9w7vw4wm6a wnGg==
MIME-Version 1.0
X-Received by 10.194.171.136 with SMTP id au8mr71303741wjc.6.1425393920926; Tue, 03 Mar 2015 06:45:20 -0800 (PST)
In-Reply-To <CAPTjJmoUsXJQjCfO=-ZQj7DYqTbe4rHJ-QQEpNghX1r9B9zntg@mail.gmail.com>
References <f1a339d0-0386-43ba-b6b4-1aee39d75581@googlegroups.com> <mailman.56.1425321135.13471.python-list@python.org> <946797be-10e6-433b-9411-2db0d5697ac8@googlegroups.com> <CALwzidmMXXoumCW2rVtY_Yh5Dp_hJ_4Tcrp736OYvkp6TTyFAA@mail.gmail.com> <CANy1k1gFfW5m_nJrmXqVGU_sYHD9tFHP3Dshc_H=oaJru-6cxg@mail.gmail.com> <CAPTjJmoUsXJQjCfO=-ZQj7DYqTbe4rHJ-QQEpNghX1r9B9zntg@mail.gmail.com>
Date Tue, 3 Mar 2015 07:45:20 -0700
Subject Re: Sort list of dictionaries
From Jason Friedman <jsf80238@gmail.com>
Cc Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.19
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.18.1425393922.21433.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1425393922 news.xs4all.nl 2852 [2001:888:2000:d::a6]:48196
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:86846

Show key headers only | View raw


On Tue, Mar 3, 2015 at 12:07 AM, Chris Angelico <rosuav@gmail.com> wrote:

> Heh, I think that miiiiiiiight be a bit abusive :) I'm not sure that
> you want to depend on the version numbers fitting inside the rules for
> IP addresses, especially given that the example has a component of
> "2214".
>

Indeed, I was mistaken

>>> ipaddress.ip_address("1000.1.2.3")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/python/lib/python3.4/ipaddress.py", line 54, in ip_address
    address)
ValueError: '1000.1.2.3' does not appear to be an IPv4 or IPv6 address

I was overcome by how neat I think the ipaddress module is.
I have not used it yet, but I expect someday I will, and I appreciate
how Python makes my job easier by doing much of my work for me.  A
colleague yesterday asked how I guaranteed my temporary file names
would not collide with another file, and my answer was I don't have to
worry about it, someone else figured it out with the tempfile module.

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


Thread

Sort list of dictionaries Charles Heizer <ceh329@gmail.com> - 2015-03-02 10:17 -0800
  Re: Sort list of dictionaries Emile van Sebille <emile@fenx.com> - 2015-03-02 10:31 -0800
    Re: Sort list of dictionaries Charles Heizer <ceh329@gmail.com> - 2015-03-02 10:38 -0800
      Re: Sort list of dictionaries Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-02 11:55 -0700
      Re: Sort list of dictionaries Charles Heizer <ceh329@gmail.com> - 2015-03-02 10:58 -0800
        Re: Sort list of dictionaries Peter Otten <__peter__@web.de> - 2015-03-02 20:23 +0100
          Re: Sort list of dictionaries Charles Heizer <ceh329@gmail.com> - 2015-03-03 07:56 -0800
            Re: Sort list of dictionaries Chris Angelico <rosuav@gmail.com> - 2015-03-04 03:09 +1100
              Re: Sort list of dictionaries Paul  Moore <p.f.moore@gmail.com> - 2015-03-03 08:48 -0800
            Re: Sort list of dictionaries Peter Otten <__peter__@web.de> - 2015-03-03 18:44 +0100
      Re: Sort list of dictionaries Dave Angel <davea@davea.name> - 2015-03-02 13:59 -0500
      Re: Sort list of dictionaries Jason Friedman <jsf80238@gmail.com> - 2015-03-02 22:33 -0700
      Re: Sort list of dictionaries Chris Angelico <rosuav@gmail.com> - 2015-03-03 18:07 +1100
      Re: Sort list of dictionaries Jason Friedman <jsf80238@gmail.com> - 2015-03-03 07:45 -0700
      Re: Sort list of dictionaries Chris Angelico <rosuav@gmail.com> - 2015-03-04 01:50 +1100
  Re: Sort list of dictionaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-03 18:55 +1100

csiph-web