[Python-checkins] peps: pep-0492: Update PEP 3152 section

yury.selivanov python-checkins at python.org
Thu Apr 23 18:52:08 CEST 2015


https://hg.python.org/peps/rev/352d4f907266
changeset:   5785:352d4f907266
parent:      5783:e4e94b8fcf45
user:        Yury Selivanov <yselivanov at sprymix.com>
date:        Thu Apr 23 12:51:13 2015 -0400
summary:
  pep-0492: Update PEP 3152 section

files:
  pep-0492.txt |  18 +++++++++++++++++-
  1 files changed, 17 insertions(+), 1 deletions(-)


diff --git a/pep-0492.txt b/pep-0492.txt
--- a/pep-0492.txt
+++ b/pep-0492.txt
@@ -748,7 +748,23 @@
    and having ``__call__`` and no ``__cocall__`` for coroutine-
    generators.
 
-6. There are no equivalents of ``async for`` and ``async with`` in PEP
+6. Requiring parentheses grammatically also introduces a whole lot
+   of new problems.
+
+   Code like the following::
+
+       await fut
+       await function_returning_future()
+       await asyncio.gather(coro1(arg1, arg2), coro2(arg1, arg2))
+
+    would look like::
+
+       cocall fut()  # or cocall costart(fut)
+       cocall (function_returning_future())()
+       cocall asyncio.gather(costart(coro1, arg1, arg2),
+                             costart(coro2, arg1, arg2))
+
+7. There are no equivalents of ``async for`` and ``async with`` in PEP
    3152.
 
 

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


More information about the Python-checkins mailing list