pep-0492: Add one more 'await' syntax example
This commit is contained in:
parent
94b51bc711
commit
50587d4184
|
@ -184,6 +184,7 @@ Expression Will be parsed as
|
||||||
``return await coro()`` ``return ( await coro() )``
|
``return await coro()`` ``return ( await coro() )``
|
||||||
``res = await coro() ** 2`` ``res = (await coro()) ** 2``
|
``res = await coro() ** 2`` ``res = (await coro()) ** 2``
|
||||||
``func(a1=await coro(), a2=0)`` ``func(a1=(await coro()), a2=0)``
|
``func(a1=await coro(), a2=0)`` ``func(a1=(await coro()), a2=0)``
|
||||||
|
``await foo() + await bar()`` ``(await foo()) + (await bar())``
|
||||||
================================== ==================================
|
================================== ==================================
|
||||||
|
|
||||||
See `Grammar Updates`_ section for details.
|
See `Grammar Updates`_ section for details.
|
||||||
|
|
Loading…
Reference in New Issue