14 Dec
2019
14 Dec
'19
12:40 p.m.
14.12.19 12:45, Steven D'Aprano пише:
The list.sort method is documented to only use less than:
https://docs.python.org/3/library/stdtypes.html#list.sort
but I don't think that is correct, it seems to use greater than if it exists and less than doesn't. My understanding is that items need to define one of l.t. or g.t. to make it sortable, not the full complement of six rich comparison methods.
What evidence do you have that it is not correct?