[issue26188] Provide more helpful error message when `await` is called inside non-`async` method

Martin Panter report at bugs.python.org
Tue Feb 2 16:24:55 EST 2016


Martin Panter added the comment:

I’m not that familiar with the parser either. Maybe I remember a flag or something saying “we are inside an async def function”, which changes “await” from a user identifier into a reserved keyword. But I can’t imagine how that flag will help much with this proposal. The problem I think is “await” is never treated as a reserved keyword when the flag is not set.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26188>
_______________________________________


More information about the Python-bugs-list mailing list