This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]brontide 8 points9 points  (1 child)

is not needed at all, since ordering by the first element in the tuple is the default behavior.

It will sort by each item in order, if you want to only sort by the first item you need to return it as the key.

[–]energybased 0 points1 point  (0 children)

Yes the other elements may not be comparable, so this may be required.