On Tue, Oct 14, 2003 at 09:55:54AM -0700, Guido van Rossum wrote: > If we're going to do a custom object, it should be a fixed-length > struct containing (1) the key, (2) a C int of sufficient size to hold > the record index; (3) a pointer to the record, and its comparison > should only use (1) and (2). I just thought of another reason why this is a good idea. Imagine I want to sort a list of objects that cannot be compared (e.g. complex numbers). I would expect cnums.sort(key = lambda n: n.real) to work, not fail with an exception. Neil
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