On Mon, 2003-10-20 at 19:22, Guido van Rossum wrote: > But the argument that it wastes a copy still stands (even though > that's only O(N) vs. O(N log N) for the sort). That would be irrelevant in most of the cases where I would use it - typically sorting short lists or dicts where the overhead is unmeasurable. > I'm still unclear why this so important to have in the library when > you can write it yourself in two lines. For little standalone scripts it gets a bit tedious to write this again and again. It doesn't take much code to write dict.fromkeys() manually, but I'm glad that it's there. I'd say list.sorted (or whatever it gets called) has at least as much claim to exist. Mark Russell
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