
March 16, 2003
4:36 a.m.
[Guido]
Yes. And I'm still hoping to remove __cmp__; there should be only one way to overload comparisons.
As long as we're going to break everyone's code, list.sort(f) should also be redefined then so that f returns a Boolean, f(a, b) meaning a is less than b. list.sort()'s implementation uses only less-than already, and it seems that all newcomers to Python who didn't come by way of C or Perl (same thing in this respect <wink>) expect sort's comparison function to work that way.