Message402278
-0 on this. While it is true that __lt__ is used, we don't really want people to exploit that fact. Doing so will get them into trouble elsewhere. For example, max(seq) uses __gt__. Also, when mixing types, a return of NotImplemented will trigger a call to the reflection method. And PEP 8 recommends that all six rich comparison operators be defined to avoid hard-to-find bugs. |
|
Date |
User |
Action |
Args |
2021-09-20 20:37:47 | rhettinger | set | recipients:
+ rhettinger, tim.peters, docs@python, DimitriPapadopoulosOrfanos |
2021-09-20 20:37:46 | rhettinger | set | messageid: <1632170266.18.0.831991737419.issue45246@roundup.psfhosted.org> |
2021-09-20 20:37:46 | rhettinger | link | issue45246 messages |
2021-09-20 20:37:46 | rhettinger | create | |
|