Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'bug': 0.02; '2.7': 0.05; 'ryan': 0.05; 'terry': 0.07; 'url:bugs': 0.07; 'python': 0.07; '3.x': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:method': 0.09; '>>>': 0.12; 'am,': 0.14; 'wrote:': 0.14; 'both.': 0.16; 'cmp': 0.16; 'reedy': 0.16; 'subject:sort': 0.16; 'wil': 0.16; 'jan': 0.22; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'raymond': 0.22; 'enhancements': 0.23; 'fix': 0.24; 'version': 0.25; 'skip:l 30': 0.25; 'moving': 0.26; 'there.': 0.26; 'pass': 0.27; 'function': 0.27; 'fri,': 0.29; 'this.': 0.30; 'comparison': 0.31; 'usable': 0.31; 'to:addr:python-list': 0.32; 'worry': 0.33; 'header:X-Complaints-To:1': 0.34; 'there': 0.35; 'header:User-Agent:1': 0.35; 'lie': 0.35; 'url:python': 0.37; 'apr': 0.38; 'faster': 0.38; 'but': 0.38; 'url:org': 0.38; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'header:Mime- Version:1': 0.39; 'would': 0.40; 'header:Received:5': 0.40; '2011': 0.62; 'subject:removal': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Guido rethinking removal of cmp from sort method Date: Mon, 04 Apr 2011 13:26:30 -0400 References: <4d7cbfcb$0$29971$c3e8da3$5496439d@news.astraweb.com> <4d94326c$0$30003$c3e8da3$5496439d@news.astraweb.com> <7x8vvue7or.fsf@ruckus.brouhaha.com> <7xfwq1srn0.fsf@ruckus.brouhaha.com> <4d99c7cf$1@dnews.tpgi.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 In-Reply-To: <4d99c7cf$1@dnews.tpgi.com.au> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 22 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1301938213 news.xs4all.nl 81476 [::ffff:82.94.164.166]:52452 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:2581 On 4/4/2011 9:35 AM, Lie Ryan wrote: > On 04/04/11 19:34, Antoon Pardon wrote: >> On Fri, Apr 01, 2011 at 10:21:33PM -0400, Terry Reedy wrote: >>> >>> rewriting cmp_to_key in C is underway >>> >>> http://bugs.python.org/issue11707 >>> >> Nice to know! Any chance this wil get into 2.7.x? > > Python 2.7 still have list.sort(cmp=...)/sorted(cmp=...), so cmp_to_key > is not much use there. Just pass your comparison function to the cmp > argument. .cmp_to_key was added to ease moving to 3.x or maintaining code usable on both. A faster version would encourage such use. But it is not a bug fix exactly, and there is always worry that permanance enhancements may have unforseen side effects. I will let Raymond make the call on this. -- Terry Jan Reedy