diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-22 13:33:45 +0300 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-22 13:33:45 +0300 |
commit | 35c1e53a87bc711efc72fcdd5ce25b9f124ab563 (patch) | |
tree | 09db82b3cc526878260437a9885da00758087b4a /Python/compile.c | |
parent | f553f864c939b12e93afc2ec3c1afe26965292cd (diff) | |
download | cpython-35c1e53a87bc711efc72fcdd5ce25b9f124ab563.tar.gz |
Issue #24619: New approach for tokenizing async/await.
This commit fixes how one-line async-defs and defs are tracked
by tokenizer. It allows to correctly parse invalid code such
as:
>>> async def f():
... def g(): pass
... async = 10
and valid code such as:
>>> async def f():
... async def g(): pass
... await z
As a consequence, is is now possible to have one-line
'async def foo(): await ..' functions:
>>> async def foo(): return await bar()
Diffstat (limited to 'Python/compile.c')
0 files changed, 0 insertions, 0 deletions