[Python-checkins] peps: pep-0492: Edits re PEP 3152.

yury.selivanov python-checkins at python.org
Mon Apr 20 05:19:56 CEST 2015


https://hg.python.org/peps/rev/fac089ecab12
changeset:   5776:fac089ecab12
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Sun Apr 19 23:19:52 2015 -0400
summary:
  pep-0492: Edits re PEP 3152.

files:
  pep-0492.txt |  6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/pep-0492.txt b/pep-0492.txt
--- a/pep-0492.txt
+++ b/pep-0492.txt
@@ -692,8 +692,10 @@
    executes ``yield from`` on it.  Although, ``__await__`` method is similar to
    ``__cocall__``, but is only used to define *Future-like* objects.
 
-2. ``await`` is defined in the same way as ``yield`` in the grammar (it is
-   later enforced that ``await`` can only be inside ``async def``).
+2. ``await`` is defined in almost the same way as ``yield from`` in the grammar
+   (it is later enforced that ``await`` can only be inside ``async def``).  It
+   is possible to simply write ``await future``, whereas ``cocall`` always
+   requires parentheses.
 
 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

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list