[issue39210] Sorting falls back to use __gt__ when __lt__ is not present

2020-01-04 Thread Yan Mitrofanov
Yan Mitrofanov added the comment: I got your point. So it seems that two pieces of documentation are not equivalent: https://docs.python.org/3/howto/sorting.html#odd-and-ends > The sort routines are guaranteed to use __lt__() when making comparisons > between two objects.

[issue39210] Sorting falls back to use __gt__ when __lt__ is not present

2020-01-04 Thread Yan Mitrofanov
New submission from Yan Mitrofanov : Sorting documentation claims that sorting algorithm is only using < comparisons https://docs.python.org/3/howto/sorting.html#odd-and-ends https://docs.python.org/3/library/stdtypes.html#list.sort When __lt__ implementation is missing, you get an except