pep-0492: async_def() works on generator-functions.

This commit is contained in:
Yury Selivanov 2015-04-18 13:31:56 -04:00
parent 0222b32b38
commit ad72ded22c
1 changed files with 2 additions and 2 deletions

View File

@ -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.