pep-0492: async_def() works on generator-functions.
This commit is contained in:
parent
0222b32b38
commit
ad72ded22c
|
@ -99,8 +99,8 @@ Key properties of coroutines:
|
|||
types.async_def()
|
||||
-----------------
|
||||
|
||||
A new function ``async_def(gen)`` is added to the ``types`` module. It
|
||||
applies ``CO_ASYNC`` flag to the passed generator's code object, so that it
|
||||
A new function ``async_def(gen)`` is added to the ``types`` module. It applies
|
||||
``CO_ASYNC`` flag to the passed generator-function's code object, so that it
|
||||
returns a *coroutine object* when called.
|
||||
|
||||
This feature enables an easy upgrade path for existing libraries.
|
||||
|
|
Loading…
Reference in New Issue