Handle nested async for in for...

and Better async comprehension detection.

Still more work is needed. See commented-out section in
test/simple_source/bug37/02_async_for_generator.py
This commit is contained in:
rocky
2020-03-31 12:05:39 -04:00
parent af8add9df4
commit e2d349f781
6 changed files with 130 additions and 52 deletions

View File

@@ -6,3 +6,11 @@ def make_arange(n):
async def run(m):
return [i async for i in m]
# From 3.7.6 test_coroutines.py
async def run_list(pair, f):
return [i for pair in p async for i in f]
# FIXME: add this. It works in decompyle3
# async def run_gen():
# return (i async for i in f if 0 < i < 4)