mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-32311: Implement asyncio.create_task() shortcut (#4848)
* Implement functionality * Add documentation
This commit is contained in:
parent
19a44f63c7
commit
f74ef458ab
12 changed files with 201 additions and 95 deletions
|
@ -3,7 +3,7 @@ __all__ = ()
|
|||
import concurrent.futures._base
|
||||
import reprlib
|
||||
|
||||
from . import events
|
||||
from . import format_helpers
|
||||
|
||||
Error = concurrent.futures._base.Error
|
||||
CancelledError = concurrent.futures.CancelledError
|
||||
|
@ -38,7 +38,7 @@ def _format_callbacks(cb):
|
|||
cb = ''
|
||||
|
||||
def format_cb(callback):
|
||||
return events._format_callback_source(callback, ())
|
||||
return format_helpers._format_callback_source(callback, ())
|
||||
|
||||
if size == 1:
|
||||
cb = format_cb(cb[0])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue