> Guido: > > And I'm still hoping to remove __cmp__; there should be only one > > way to overload comparisons. [Greg] > I'd rather you kept it and re-defined it to mean > "compare for arbitrary ordering". (Maybe change its > name if there are backwards-compatibility issues.) Hm, that's not what it does now, and an arbitrary ordering is better defined by a "less" style operator. I've been thinking of __before__ and a built-in before(x, y) -> bool. (Not __less__ / less, because IMO that's to close to __lt__ / <.) BTW, there are two possible uses for before(): it could be used to impose an arbitrary ordering for types that don't have one now (like complex); and it could be used to impose an ordering between different types (like numbers and strings). I've got a gut feeling that the requirements for these are somewhat different, but can't quite pinpoint it. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4