pep-0492: Edits re PEP 3152.
This commit is contained in:
parent
ebbbbd4463
commit
61a8636d0d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue