From 61a8636d0d1eafccbdb2b7625a313f4a7ea2f9c1 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Sun, 19 Apr 2015 23:19:52 -0400 Subject: [PATCH] pep-0492: Edits re PEP 3152. --- pep-0492.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pep-0492.txt b/pep-0492.txt index 84afd9517..452a5998e 100644 --- a/pep-0492.txt +++ b/pep-0492.txt @@ -692,8 +692,10 @@ Differences from this proposal: 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