Nick Coghlan wrote:
Stability in sorting is a property not to be sneezed at - it means switching to sorting by a second key gives the effect of "sort by key 1, then by key 2", whereas that doesn't hold with an unstable sort

Assuming "key 1" refers to the first key, and "key 2" to the second key, then I believe you meant "gives the effect of 'sort by key 2 then by key 1'".

In other words, if you have a stable sort algorithm and do one sort
operation using key 2, then a second sort operation using key 1,
it's the same as doing a single sort with the key combination "key 1, key 2",
not the other way around.

-Peter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to