Q: sort's key and cmp parameters

kj no.email at please.post
Thu Oct 1 22:13:29 EDT 2009


In <b8f7dea7-0fe3-4e25-9ffd-6796a6e2a5e6 at a37g2000prf.googlegroups.com> alex23 <wuwei23 at gmail.com> writes:

>kj <no.em... at please.post> wrote:
>> This example convinces me that it was a bad idea to
>> get rid of cmp in Python 3, even if situations like this one are
>> rare.

>It sounds like the entire point of this exercise was to get other
>people to confirm your bias for you.

The only problem with this hypothesis is that my original bias was
exactly the opposite to the one you quote: when I sent my original
post I thought that cmp was in fact useless (after all I could not
think of a situation that required it or even made it preferable),
and was not even aware that it had been dropped in Python 3.  Paul
Rubin's post convinced me otherwise.

BTW, what's with this business of ascribing underhanded motives to
me?  Earlier some other clown alleged that that my original post
was homework???  WTF?

kj



More information about the Python-list mailing list