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


Groups > comp.lang.python > #32547

Re: sort order for strings of digits

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'already.': 0.09; 'cmp': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'py3': 0.16; 'slow,': 0.16; 'sorting': 0.16; 'sorts': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'header:In-Reply-To:1': 0.25; 'supported': 0.26; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; "d'aprano": 0.29; 'steven': 0.29; "i'm": 0.29; 'function': 0.30; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'nov': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'should': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'possible.': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'soon': 0.70
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:to :content-type; bh=HYmw/+WSEW1ykUrGa8MOGV3Q45+AQTrlbE5H8onBqtM=; b=f943JvUG7bLgR+8ByHjbMN9GN8Bp0Q+MsjD9MJj6xzrigUJu9prJOmtvbP04aSVvjw hYTrTWvbiHSFyk22GTGl4vXAdmQpbOg3bDgghPvnWFIABgIFtrTDI6RNE3b4guaJQgg1 SNyiyVTFbNnbFfHReMUTIVFq1AgQZjJI1RZxWtiLApGOhBhOn0cab7tM2suEO51Sm6ef s0XYY0Cmi9SHF8l01Y2ERq3b6qfd/un8j5vY8sykYTH/GrppoXXvbpk5B7lLWRQRupsO uCoc3yLiBswTOzHnGCpaejZAppVMYsoXyEceQQ71aTp6HfQEis+QRldBnMlu1ipWyYlk MQpA==
MIME-Version 1.0
In-Reply-To <5091b7cd$0$29967$c3e8da3$5496439d@news.astraweb.com>
References <k6rfdu$rgn$1@news.albasani.net> <r6o298hjti156vakv253ptce9hs9u9ge4d@invalid.netcom.com> <k6s5fc$pq1$1@ger.gmane.org> <CALwzidn9iVBUK9eLbuhfSBSA_Y_FqjhCmvx7JTTNyxXSJgS-Fg@mail.gmail.com> <mailman.3130.1351724723.27098.python-list@python.org> <5091b7cd$0$29967$c3e8da3$5496439d@news.astraweb.com>
Date Thu, 1 Nov 2012 11:53:06 +1100
Subject Re: sort order for strings of digits
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3134.1351731190.27098.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1351731190 news.xs4all.nl 6861 [2001:888:2000:d::a6]:59540
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:32547

Show key headers only | View raw


On Thu, Nov 1, 2012 at 10:44 AM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On the contrary. If you are using cmp with sort, your sorts are slow, and
> you should upgrade to using a key function as soon as possible.
>

But cmp_to_key doesn't actually improve anything. So I'm not sure how
Py3 has achieved anything; Py2 supported key-based sorting already.

ChrisA

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


Thread

sort order for strings of digits djc <djc@kangoo.invalid> - 2012-10-31 15:17 +0000
  Re: sort order for strings of digits Hans Mulder <hansmu@xs4all.nl> - 2012-10-31 16:31 +0100
  Re: sort order for strings of digits Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-31 09:44 -0600
  Re: sort order for strings of digits Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-31 14:17 -0400
  Re: sort order for strings of digits Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-31 21:33 +0000
  Re: sort order for strings of digits Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-10-31 19:05 -0400
    Re: sort order for strings of digits Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-31 23:44 +0000
      Re: sort order for strings of digits Chris Angelico <rosuav@gmail.com> - 2012-11-01 11:53 +1100
        Re: sort order for strings of digits Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-02 00:27 +0000
  Re: sort order for strings of digits Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-31 23:09 +0000
    Re: sort order for strings of digits DJC <djc@news.invalid> - 2012-10-31 23:45 +0000
    Re: sort order for strings of digits Arnaud Delobelle <arnodel@gmail.com> - 2012-11-01 00:59 +0000
  Re: sort order for strings of digits Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-01 00:30 +0000
  Re: sort order for strings of digits wxjmfauth@gmail.com - 2012-11-01 01:52 -0700

csiph-web