You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
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:
@@ -1207,7 +1207,11 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
|
||||
is_30_dict_comp = False
|
||||
store = None
|
||||
n = ast[iter_index]
|
||||
if node == "list_comp_async":
|
||||
n = ast[2][1]
|
||||
else:
|
||||
n = ast[iter_index]
|
||||
|
||||
if ast in (
|
||||
"set_comp_func",
|
||||
"dict_comp_func",
|
||||
@@ -1238,7 +1242,7 @@ class SourceWalker(GenericASTTraversal, object):
|
||||
pass
|
||||
pass
|
||||
elif ast == "listcomp_async":
|
||||
store = ast[3]
|
||||
store = ast[2][1]
|
||||
else:
|
||||
assert n == "list_iter", n
|
||||
|
||||
|
Reference in New Issue
Block a user