Date: Mon, 04 Apr 2011 23:35:14 +1000 From: Lie Ryan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101110 Lightning/1.0b3pre Thunderbird/3.1.6 ThunderBrowse/3.3.4 MIME-Version: 1.0 Newsgroups: comp.lang.python Subject: Re: Guido rethinking removal of cmp from sort method 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> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 110.175.240.90 X-Original-NNTP-Posting-Host: 110.175.240.90 Message-ID: <4d99c7cf$1@dnews.tpgi.com.au> X-Trace: dnews.tpgi.com.au!tpg.com.au 1301923791 110.175.240.90 (4 Apr 2011 23:29:51 +1000) Lines: 12 Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.alt.net!news.kjsl.com!rahul.net!wasp.rahul.net!rahul.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:2564 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.