New submission from Stefan Krah:
If I understand the reference manual correctly, these should probably
be rejected by the compiler:
>>> async def f():
... def g(): pass
... async = 10
...
>>> async def f():
... def async():
... pass
...
>>> async def f(): async = 10
...
>>> async def f():
... def await(): pass
...
>>>
And this should perhaps be accepted:
>>> async def f():
... return lambda await: await
File "<stdin>", line 2
return lambda await: await
^
SyntaxError: invalid syntax
This, too:
>>> async def f():
... async def g(): pass
... await z
File "<stdin>", line 3
await z
^
SyntaxError: invalid syntax
----------
messages: 246660
nosy: gvanrossum, skrah, yselivanov
priority: normal
severity: normal
status: open
title: async/await parser issues
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24619>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com