> If this goes in can we document that adding a key parameter makes the > sort stable and key=None causes a stable sort to happen? Current > CPython won't have to do anything at all with that, but other Pythons > (or a future CPython where a mythical faster-than-timsort nonstable > sort is discovered) would have a documented way to force stability. That sounds like an extremely roundabout way of doing it; *if* there had to be a way to request a stable sort, I'd say that specifying a 'stable' keyword would be the way to do it. But I think that's unnecessary. Given that the Jython folks had Tim's sort algorithm translated into Java in half a day, I don't see why we can't require all implementations to have a stable sort. It's not like you can gain significant speed over Timsort. --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