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


Groups > comp.lang.python > #2852

Re: Guido rethinking removal of cmp from sort method

Date 2011-04-09 02:12 +1000
From Lie Ryan <lie.1296@gmail.com>
Newsgroups comp.lang.python
Subject Re: Guido rethinking removal of cmp from sort method
References <4d7cbfcb$0$29971$c3e8da3$5496439d@news.astraweb.com> <7xoc51vag2.fsf@ruckus.brouhaha.com> <e1510fe7-197f-434e-938c-fcc4b9407526@s9g2000yqm.googlegroups.com> <4D8BE3BB.4030508@v.loewis.de> <inn8cm$9ee$1@panix5.panix.com>
Message-ID <4d9f32a2$1@dnews.tpgi.com.au> (permalink)

Show all headers | View raw


On 04/09/11 01:08, Aahz wrote:
> Actually, my take is that removing __cmp__ was a mistake.  (I already
> argued about it back in python-dev before it happened, and I see little
> point rehashing it.  My reason is strictly efficiency grounds: when
> comparisons are expensive -- such as Decimal object -- __cmp__ is
> faster.)

I don't get you... why would sorting a list using __cmp__ be faster when
comparisons are expensive?

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


Thread

Re: Guido rethinking removal of cmp from sort method aahz@pythoncraft.com (Aahz) - 2011-04-08 08:08 -0700
  Re: Guido rethinking removal of cmp from sort method Lie Ryan <lie.1296@gmail.com> - 2011-04-09 02:12 +1000
    Re: Guido rethinking removal of cmp from sort method aahz@pythoncraft.com (Aahz) - 2011-04-08 12:40 -0700

csiph-web