pep-0492: Why "async def" -- add a note about grammar.
This commit is contained in:
parent
d0d589154f
commit
5dce7dd65f
|
@ -896,8 +896,9 @@ Having "async" after the main statement keyword might introduce some
|
|||
confusion, like "for async item in iterator" can be read as "for each
|
||||
asynchronous item in iterator".
|
||||
|
||||
Also, "async def" better separates coroutines from regular functions
|
||||
visually.
|
||||
Having ``async`` keyword before ``def``, ``with`` and ``for`` also
|
||||
makes the language grammar simpler. And "async def" better separates
|
||||
coroutines from regular functions visually.
|
||||
|
||||
|
||||
Why not a __future__ import
|
||||
|
|
Loading…
Reference in New Issue