diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-23 15:01:58 +0300 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-07-23 15:01:58 +0300 |
commit | 97de150fd93a4921cd5d4bd81110420095c8ce29 (patch) | |
tree | 5af23bf2d76463cea08445db881e454b70f77479 /Lib/test/test_coroutines.py | |
parent | debd2831daa2f74af4270cbdf79a642942bce4f5 (diff) | |
download | cpython-97de150fd93a4921cd5d4bd81110420095c8ce29.tar.gz |
Issue #24619: Simplify async/await tokenization.
This commit simplifies async/await tokenization in tokenizer.c,
tokenize.py & lib2to3/tokenize.py. Previous solution was to keep
a stack of async-def & def blocks, whereas the new approach is just
to remember position of the outermost async-def block.
This change won't bring any parsing performance improvements, but
it makes the code much easier to read and validate.
Diffstat (limited to 'Lib/test/test_coroutines.py')
-rw-r--r-- | Lib/test/test_coroutines.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py index 14682ca604..10de85644e 100644 --- a/Lib/test/test_coroutines.py +++ b/Lib/test/test_coroutines.py @@ -330,6 +330,7 @@ class AsyncBadSyntaxTest(unittest.TestCase): async def f(): async def g(): pass await z + await = 1 self.assertTrue(inspect.iscoroutinefunction(f)) |