Python 3 __cmp__ semantic change?

George Sakkis george.sakkis at gmail.com
Fri Nov 21 02:01:09 CET 2008


On Nov 20, 6:58 pm, s... at pobox.com wrote:

>     Johannes> Seems it was removed on purpose - I'm sure there was a good
>     Johannes> reason for that, but may I ask why?
>
> Start here:
>
>     http://www.mail-archive.com/python-3...@python.org/msg11474.html
>
> Also, a comment to this blog post suggests creating a CmpMixin:
>
>    http://oakwinter.com/code/porting-setuptools-to-py3k/
>
> Skip

Dropping __cmp__ without providing implicit or at least easy explicit
[1] total ordering is (was?) a mistake; it opens the door to subtle
bugs or redundant boilerplate code.

[1] E.g. http://code.activestate.com/recipes/576529/



More information about the Python-list mailing list