What happened to __cmp__() in Python 3.x?
breamoreboy at yahoo.co.uk
Sun Aug 16 14:33:29 CEST 2009
Xavier Ho wrote:
> On Sun, Aug 16, 2009 at 9:49 PM, Mark Lawrence <breamoreboy at yahoo.co.uk>wrote:
>> Unfortunately I don't think it's that easy, see.
>> The issue referenced is still open. This of course assumes that I've
>> posted the correct link this time!
> I'm not sure what you're referring to here. The link brought me to about
> __ne__ being automatically determined when __eq__ is defined. Although it is
> a rich comparison special method, it doesn't entirely cover the usefulness
> of __cmp__().
> Terry: I'll give that a test tomorrow and see what I can come up with.
> Thanks for the quick info.
> Ching-Yun "Xavier" Ho, Technical Artist
> Contact Information
> Mobile: (+61) 04 3335 4748
> Skype ID: SpaXe85
> Email: contact at xavierho.com
> Website: http://xavierho.com/
I wasn't discussing __cmp__, I was referring to the quote by Chris
Rebert from the Python docs regarding the rich comparison methods, a
discrepancy between the documentation and the implementation as noted in
the link that I gave, and an indication that the issue raised on this
discrepancy is still open. As Terry Reedy has mentioned __lt__
elsewhere, you should be aware of the discrepancy, otherwise you could
go charging off down the wrong track. FWIW it was Terry who raised the
issue 4395, I'm sure that he could explain the ramifications of it all
far better than I ever could, so I'll sign out.
More information about the Python-list