diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py index 01320cdf62b..8a7bb814a31 100644 --- a/Lib/asyncio/events.py +++ b/Lib/asyncio/events.py @@ -178,6 +178,10 @@ class TimerHandle(Handle): self._cancelled == other._cancelled) return NotImplemented + def __ne__(self, other): + equal = self.__eq__(other) + return NotImplemented if equal is NotImplemented else not equal + def cancel(self): if not self._cancelled: self._loop._timer_handle_cancelled(self)