diff --git a/uncompyle6/parsers/parse37.py b/uncompyle6/parsers/parse37.py index ce8dedc8..bfa71b27 100644 --- a/uncompyle6/parsers/parse37.py +++ b/uncompyle6/parsers/parse37.py @@ -590,6 +590,7 @@ class Python37Parser(Python37BaseParser): # Order of LOAD_CONST YIELD_FROM is switched from 3.6 to save a LOAD_CONST async_for_stmt37 ::= setup_loop expr GET_AITER + _come_froms SETUP_EXCEPT GET_ANEXT LOAD_CONST YIELD_FROM store @@ -602,6 +603,7 @@ class Python37Parser(Python37BaseParser): async_forelse_stmt ::= setup_loop expr GET_AITER + _come_froms SETUP_EXCEPT GET_ANEXT LOAD_CONST YIELD_FROM store diff --git a/uncompyle6/semantics/customize37.py b/uncompyle6/semantics/customize37.py index 976c340b..33297137 100644 --- a/uncompyle6/semantics/customize37.py +++ b/uncompyle6/semantics/customize37.py @@ -62,9 +62,9 @@ def customize_for_version37(self, version): ), "async_for_stmt37": ( "%|async for %c in %c:\n%+%c%-\n\n", - (7, "store"), + (8, "store"), (1, "expr"), - (16, "for_block"), + (17, "for_block"), ), "async_with_stmt": ("%|async with %c:\n%+%c%-", (0, "expr"), 3), "async_with_as_stmt": ( @@ -75,10 +75,10 @@ def customize_for_version37(self, version): ), "async_forelse_stmt": ( "%|async for %c in %c:\n%+%c%-%|else:\n%+%c%-\n\n", - (7, "store"), + (8, "store"), (1, "expr"), - (17, "for_block"), - (25, "else_suite"), + (-10, "for_block"), + (-2, "else_suite"), ), "attribute37": ("%c.%[1]{pattr}", (0, "expr")), "attributes37": ("%[0]{pattr} import %c",