python 3's adoption

mdj mdj.mdj at
Fri Jan 29 02:38:23 CET 2010

On Jan 29, 9:47 am, Paul Boddie <p... at> wrote:
> On 27 Jan, 13:26, Xah Lee <xah... at> wrote:
> > So, for practical reasons, i think a “key” parameter is fine. But
> > chopping off “cmp” is damaging. When your data structure is complex,
> > its order is not embedded in some “key”. Taking out “cmp” makes it
> > impossible to sort your data structure.
> What would annoy me if I used Python 3.x would be the apparent lack of
> the __cmp__ method for conveniently defining comparisons between
> instances of my own classes. Having to define all the rich comparison
> methods frequently isn't even as much fun as it sounds.

OT, but you can always define the other operators in terms of a cmp
and mix it in, restoring the original behaviour. Unfortunately it
won't restore the original performance until someone comes to their
senses and restores __cmp__


More information about the Python-list mailing list