Message402209
The documentation of sorted() lacks any reference to the comparison mechanism between items.
Compare with the documentation of list.sort(), which starts with:
using only < comparisons between items
This is mentioned in the "Sorting HOW TO", under "Odd and Ends":
The sort routines are guaranteed to use __lt__() when making comparisons between two objects.
However, the "Sorting HOW TO" is "a brief sorting tutorial", not the reference documentation. This property needs to be documented in the reference documentation of sorted(). |
|
Date |
User |
Action |
Args |
2021-09-20 08:06:52 | DimitriPapadopoulosOrfanos | set | recipients:
+ DimitriPapadopoulosOrfanos, docs@python |
2021-09-20 08:06:52 | DimitriPapadopoulosOrfanos | set | messageid: <1632125212.88.0.211688526442.issue45246@roundup.psfhosted.org> |
2021-09-20 08:06:52 | DimitriPapadopoulosOrfanos | link | issue45246 messages |
2021-09-20 08:06:52 | DimitriPapadopoulosOrfanos | create | |
|