Sync 3.7 async_forelse with decompyle3

This commit is contained in:
rocky
2022-05-05 06:47:24 -04:00
parent c9f33edde4
commit f9a1f6fcd9
2 changed files with 7 additions and 5 deletions

View File

@@ -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

View File

@@ -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",