From dd9c33c30dc725ccaa61bdc39ac131df78f23d6e Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Thu, 23 Apr 2015 12:51:13 -0400 Subject: [PATCH] pep-0492: Update PEP 3152 section --- pep-0492.txt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pep-0492.txt b/pep-0492.txt index 1596bc0ef..770535bca 100644 --- a/pep-0492.txt +++ b/pep-0492.txt @@ -748,7 +748,23 @@ Differences from this proposal: 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.