[Python-3000] Total ordering and cmp (original) (raw)

Collin Winter collinw at gmail.com
Wed Mar 21 04:57:49 CET 2007


On 3/20/07, Guido van Rossum <guido at python.org> wrote:

I haven't taken any action, and it looks like cmp isn't being called. I'd rather not add it back; if you want it back, could you at least write up a brief PEP? A patch would also help; I recall that it was quite a relief being able to cut it out, so I expect that patching it back in would be quite cumbersome.

I'm not wild about the idea of reintroducing it. I'd at least like some kind of transition strategy that 2to3 can help with (if not implement entirely). Perhaps something like, "if a class defines a cmp method but not lt, gt, ge, etc, 2to3 will insert those methods, implemented by wrapping calls to cmp() as appropriate".

Collin Winter



More information about the Python-3000 mailing list