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 lemburg
Recipients amaury.forgeotdarc, benjamin.peterson, brett.cannon, christian.heimes, georg.brandl, lemburg, mark.dickinson, pitrou, rhettinger
Date 2008-12-09.11:53:15
SpamBayes Score 4.554579e-12
Marked as misclassified No
Message-id <493E5C29.6040007@egenix.com>
In-reply-to <1228816758.56.0.395743984917.issue1717@psf.upfronthosting.co.za>
Content
On 2008-12-09 10:59, Raymond Hettinger wrote:
> Raymond Hettinger <rhettinger@users.sourceforge.net> added the comment:
> 
> Moving cmp() somewhere other than builtins is not progress.  IMO, it
> needs to die off and the concept of it needs to disappear completely. 
> Code is better without it.  Three-way comparisons are PITA to use --
> their only virtue is as an optimization in the few cases where one
> three-way test is cheaper to compute than two two-way tests.
> 
> The goal for 3.0 was to have one way to do it and thereby simplify the
> language.  Tucking it away in a module or writing a new decorator
> defeats the purpose.  It simply should die and go away.

The idea was to have one implementation of the work-around (a>b) - (b<a)
instead of 10 or so instances of this snippet in the Python stdlib
and probably a few hundred places in other code.

Indeed, the motivation is to have one obvious way to write this
work-around :-)

Note that cmp() doesn't make __cmp__ come back, but it does help
porting code that uses cmp().

Besides, cmp() is available builtin in 3.0, so it's too late to just
remove it anyway. We'd have to go through the usual deprecation
process.
History
Date User Action Args
2008-12-09 11:53:19lemburgsetrecipients: + lemburg, brett.cannon, georg.brandl, rhettinger, amaury.forgeotdarc, mark.dickinson, pitrou, christian.heimes, benjamin.peterson
2008-12-09 11:53:18lemburglinkissue1717 messages
2008-12-09 11:53:15lemburgcreate