[issue37685] Fix equality checks for some types

Kyle Stanley report at bugs.python.org
Sat Jul 27 13:30:37 EDT 2019


Kyle Stanley <aeros167 at gmail.com> added the comment:

> Serhiy: Is there a reason not to use the functools.total_ordering decorator on TimerHandle, so you can get rid of __le__/__ge__/__gt__ rather than fixing them 
> individually?

I strongly agree with this suggestion, unless there's some unique behavior with TimerHandle objects which would prevent this from being viable. IMO, the @total_ordering decorator should be used as much as practically possible. Individually specifying all of the rich comparisons when we don't have to adds a significant maintenance cost.

----------
nosy: +aeros167

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37685>
_______________________________________


More information about the Python-bugs-list mailing list