What's a good solution to implement rich comparison for user-defined classes? (was: What happened to __cmp__() in Python 3.x?)

Xavier Ho contact at xavierho.com
Sat Aug 15 14:16:14 CEST 2009

Never mind my last email. Google actually found me something at last.

I also found this page:

That still uses a sloppy way of defining the special methods, and a little

Is there a better way for the lazy me?

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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090815/288cafb0/attachment.html>

More information about the Python-list mailing list