cmp and sorting non-symmetric types

Paul Rubin http
Tue Nov 13 23:54:21 CET 2007


Carl Banks <pavlovevidence at gmail.com> 
> resurrecting the __cmp__ operator.

I didnd't realize __cmp__ was going.  Are we really supposed to
implement all the rich comparison methods to code an ordered class?
Or is there some kind of library superclass we can inherit from that
implements something like __cmp__?  What about making __key__ ?



More information about the Python-list mailing list