[Python-checkins] peps: pep-0492: Edits in PEP 3152 section
yury.selivanov
python-checkins at python.org
Thu Apr 23 22:22:59 CEST 2015
https://hg.python.org/peps/rev/48270715bd25
changeset: 5794:48270715bd25
user: Yury Selivanov <yselivanov at sprymix.com>
date: Thu Apr 23 16:22:57 2015 -0400
summary:
pep-0492: Edits in PEP 3152 section
files:
pep-0492.txt | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/pep-0492.txt b/pep-0492.txt
--- a/pep-0492.txt
+++ b/pep-0492.txt
@@ -731,11 +731,10 @@
3. To make asyncio work with PEP 3152 it would be required to modify
``@asyncio.coroutine`` decorator to wrap all functions in an object
- with a ``__cocall__`` method. To call *cofunctions* from existing
- generator-based coroutines it would be required to use ``costart``
- built-in. In this proposal ``@asyncio.coroutine`` simply sets
- ``CO_COROUTINE`` on the wrapped function's code object and
- everything works automatically.
+ with a ``__cocall__`` method, or to implement ``__cocall__`` on
+ generators. To call *cofunctions* from existing generator-based
+ coroutines it would be required to use ``costart(cofunc, *args,
+ **kwargs)`` built-in.
4. Since it is impossible to call a *cofunction* without a ``cocall``
keyword, it automatically prevents the common mistake of forgetting
--
Repository URL: https://hg.python.org/peps
More information about the Python-checkins
mailing list