cmp and sorting non-symmetric types

Raymond Hettinger python at rcn.com
Wed Nov 14 16:16:54 EST 2007


On Nov 13, 1:18 pm, Carl Banks <pavlovevide... at gmail.com> wrote:
> The right solution is to use comparison operators
> only for ordered comparisons, not for subset and superset testing.

The whole point of the rich comparisons PEP was to be able to override
the operators for other purposes.



Raymond




More information about the Python-list mailing list