[Python-ideas] cmp and sorting non-symmetric types
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Nov 15 02:41:33 CET 2007
Adam Olsen wrote:
> Thus, set would need 7 methods defined (6 rich comparisons plus
> __cmp__, although it could skip __eq__ and __ne__)
With the 4-valued __cmp__ that I proposed, it would
only need __cmp__, I think.
--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | Carpe post meridiem! |
Christchurch, New Zealand | (I'm not a morning person.) |
greg.ewing at canterbury.ac.nz +--------------------------------------+
More information about the Python-ideas
mailing list