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: 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: <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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Thu, Nov 1, 2012 at 10:44 AM, Steven D'Aprano 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