ну питон возьми, у них так же было (
https://wiki.python.org/moin/HowTo/Sorting):
» In Py2.x, sort allowed an optional function which can be called for doing the comparisons. That function should take two arguments to be compared and then return a negative value for less-than, return zero if they are equal, or return a positive value for greater-than.
его удалили, но было же )