This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author LeWiemann
Recipients LeWiemann, gvanrossum, rhettinger
Date 2008-02-17.01:45:55
SpamBayes Score 0.083687626
Marked as misclassified No
Message-id <1203212757.38.0.446477863722.issue1771@psf.upfronthosting.co.za>
In-reply-to
Content
Is this really necessary?

I see that the sorting code gets a little simpler, but I believe that 
there are valid use cases for cmp out there, where using a key would at 
least be cumbersome.  So why remove it when it's useful?

For instance, if you have an algorithm to determine the order in which 
any two elements should occur (and for some reason the algorithm 
satisfies transitivity) then it's usable as the cmp function, but 
turning it into a key function may be complicated (and adversly affect 
performance); you might end up having to map each element to a number 
or tuple describing the ordering properties of the element, which can 
be non-trivial.  Besides, it can also be non-obvious.
History
Date User Action Args
2008-02-17 01:45:57LeWiemannsetspambayes_score: 0.0836876 -> 0.083687626
recipients: + LeWiemann, gvanrossum, rhettinger
2008-02-17 01:45:57LeWiemannsetspambayes_score: 0.0836876 -> 0.0836876
messageid: <1203212757.38.0.446477863722.issue1771@psf.upfronthosting.co.za>
2008-02-17 01:45:56LeWiemannlinkissue1771 messages
2008-02-17 01:45:55LeWiemanncreate