summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/events.py')
-rw-r--r--Lib/asyncio/events.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 6240019..4c0cbb0 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -20,6 +20,7 @@ class Handle:
"""Object returned by callback registration methods."""
def __init__(self, callback, args):
+ assert not isinstance(callback, Handle), 'A Handle is not a callback'
self._callback = callback
self._args = args
self._cancelled = False
@@ -42,12 +43,6 @@ class Handle:
self = None # Needed to break cycles when an exception occurs.
-def make_handle(callback, args):
- # TODO: Inline this? Or make it a private EventLoop method?
- assert not isinstance(callback, Handle), 'A Handle is not a callback'
- return Handle(callback, args)
-
-
class TimerHandle(Handle):
"""Object returned by timed callback registration methods."""