]> granicus.if.org Git - python/commitdiff
Partially revert 3603bae63c13 (issue23326) for asyncio.
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 30 Mar 2015 19:25:16 +0000 (22:25 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 30 Mar 2015 19:25:16 +0000 (22:25 +0300)
Lib/asyncio/events.py

index 01320cdf62bf2e2af1ec098fb57cead77318097b..8a7bb814a31939daa8931861d0e71f1af819ce03 100644 (file)
@@ -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)