pep-0492: Update PEP 3152 section

This commit is contained in:
Yury Selivanov 2015-04-23 12:51:13 -04:00
parent 19f729770d
commit dd9c33c30d
1 changed files with 17 additions and 1 deletions

View File

@ -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.