summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2016-10-28 16:52:37 (GMT)
committerYury Selivanov <yury@magic.io>2016-10-28 16:52:37 (GMT)
commita0c1ba608eb89b4e10155f7652c50a3ac0b709af (patch)
tree90e811ae976793876c5c04de7d91cbb7f1518fd9 /Lib/asyncio/base_events.py
parentbbcb79920b0e220c2e1b0e77db5aca2f3a2a52d4 (diff)
downloadcpython-a0c1ba608eb89b4e10155f7652c50a3ac0b709af.zip
cpython-a0c1ba608eb89b4e10155f7652c50a3ac0b709af.tar.gz
cpython-a0c1ba608eb89b4e10155f7652c50a3ac0b709af.tar.bz2
Issue #28544: Implement asyncio.Task in C.
This implementation provides additional 10-20% speed boost for asyncio programs. The patch also fixes _asynciomodule.c to use Arguments Clinic, and makes '_schedule_callbacks' an overridable method (as it was in 3.5).
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index 5880061..cc9994d 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -57,7 +57,7 @@ _FATAL_ERROR_IGNORE = (BrokenPipeError,
def _format_handle(handle):
cb = handle._callback
- if inspect.ismethod(cb) and isinstance(cb.__self__, tasks.Task):
+ if isinstance(getattr(cb, '__self__', None), tasks.Task):
# format the task
return repr(cb.__self__)
else: