"Collin Winter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Quoting from the commit message for r51533, which removed the default ordering: | | What's the status on this? FWIW, I would like to see __cmp__ stay as a | fallback measure if __eq__, __ne__, __lt__, etc aren't defined for | total ordering purposes. I've run across this while trying to get the | docs toolchain working, and I was initially shocked that __cmp__ was | no longer called.
An alternative would be to give the object class comparison methods defined in terms of a missing __cmp() method. def __eq__(self,other): return __cmp(self,other) == 0 # etc This would put the fallback to and conversion of cmp -1,0,1 output in *one* place instead of sprinkled everywhere. Or these could go into a cmp_order mixin put in some lib module. Terry Jan Reedy _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com