pep-0492: Update PEP 3152 section
This commit is contained in:
parent
19f729770d
commit
dd9c33c30d
18
pep-0492.txt
18
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.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue