mirror of
https://github.com/python/cpython.git
synced 2025-08-29 05:05:03 +00:00
asyncio: Update some comments.
This commit is contained in:
parent
1f683bbe71
commit
ec7922cb3e
1 changed files with 1 additions and 3 deletions
|
@ -42,7 +42,7 @@ class Handle:
|
||||||
|
|
||||||
|
|
||||||
def make_handle(callback, args):
|
def make_handle(callback, args):
|
||||||
# TODO: Inline this?
|
# TODO: Inline this? Or make it a private EventLoop method?
|
||||||
assert not isinstance(callback, Handle), 'A Handle is not a callback'
|
assert not isinstance(callback, Handle), 'A Handle is not a callback'
|
||||||
return Handle(callback, args)
|
return Handle(callback, args)
|
||||||
|
|
||||||
|
@ -338,7 +338,6 @@ class DefaultEventLoopPolicy(threading.local, AbstractEventLoopPolicy):
|
||||||
|
|
||||||
def set_event_loop(self, loop):
|
def set_event_loop(self, loop):
|
||||||
"""Set the event loop."""
|
"""Set the event loop."""
|
||||||
# TODO: The isinstance() test violates the PEP.
|
|
||||||
self._set_called = True
|
self._set_called = True
|
||||||
assert loop is None or isinstance(loop, AbstractEventLoop)
|
assert loop is None or isinstance(loop, AbstractEventLoop)
|
||||||
self._loop = loop
|
self._loop = loop
|
||||||
|
@ -375,7 +374,6 @@ def get_event_loop_policy():
|
||||||
def set_event_loop_policy(policy):
|
def set_event_loop_policy(policy):
|
||||||
"""XXX"""
|
"""XXX"""
|
||||||
global _event_loop_policy
|
global _event_loop_policy
|
||||||
# TODO: The isinstance() test violates the PEP.
|
|
||||||
assert policy is None or isinstance(policy, AbstractEventLoopPolicy)
|
assert policy is None or isinstance(policy, AbstractEventLoopPolicy)
|
||||||
_event_loop_policy = policy
|
_event_loop_policy = policy
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue