pep-0492: Why "async def" -- add a note about grammar.

This commit is contained in:
Yury Selivanov 2015-04-23 14:23:36 -04:00
parent d0d589154f
commit 5dce7dd65f
1 changed files with 3 additions and 2 deletions

View File

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