Replacing the latter with the former is clearly a mistake, because the stability of sorting is important! We should therefore avoid removing an inner sorted when either has a key= argument.
Fancier solutions involving returning a tuple from the key argument are out of scope, since covering all the scope-related edge cases really isn't worth the code it'd take.
Replacing the latter with the former is clearly a mistake, because the stability of sorting is important! We should therefore avoid removing an inner
sorted
when either has akey=
argument.Fancier solutions involving returning a tuple from the key argument are out of scope, since covering all the scope-related edge cases really isn't worth the code it'd take.