Partially revert 3603bae63c13 (issue23326) for asyncio.

This commit is contained in:
Serhiy Storchaka 2015-03-30 22:25:16 +03:00
parent ba6ea9b237
commit 3f5d48bead
1 changed files with 4 additions and 0 deletions

View 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)