You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Narrow precedence for call statement
This commit is contained in:
@@ -327,7 +327,10 @@ TABLE_DIRECT = {
|
|||||||
# For compatibility with older Python, we'll use "%" instead of
|
# For compatibility with older Python, we'll use "%" instead of
|
||||||
# a format string.
|
# a format string.
|
||||||
"string_at_beginning": ('%|"%%s" %% %c\n', 0),
|
"string_at_beginning": ('%|"%%s" %% %c\n', 0),
|
||||||
"call_stmt": ("%|%p\n", (0, 200)),
|
"call_stmt": ( "%|%p\n",
|
||||||
|
# When a call statement contains only a named_expr (:=)
|
||||||
|
# the named_expr should have parenthesis around it.
|
||||||
|
(0, PRECEDENCE["named_expr"]-1)),
|
||||||
"break": ("%|break\n",),
|
"break": ("%|break\n",),
|
||||||
"continue": ("%|continue\n",),
|
"continue": ("%|continue\n",),
|
||||||
"raise_stmt0": ("%|raise\n",),
|
"raise_stmt0": ("%|raise\n",),
|
||||||
|
@@ -149,6 +149,11 @@ def customize_for_version37(self, version):
|
|||||||
(1, "store"), (0, "get_aiter"), (3, "list_iter"),
|
(1, "store"), (0, "get_aiter"), (3, "list_iter"),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
"list_afor": (
|
||||||
|
" async for %[1]{%c} in %c%[1]{%c}",
|
||||||
|
(1, "store"), (0, "get_aiter"), (3, "list_iter"),
|
||||||
|
),
|
||||||
|
|
||||||
"list_if37": (" if %p%c", (0, 27), 1),
|
"list_if37": (" if %p%c", (0, 27), 1),
|
||||||
"list_if37_not": (" if not %p%c", (0, 27), 1),
|
"list_if37_not": (" if not %p%c", (0, 27), 1),
|
||||||
"testfalse_not_or": ("not %c or %c", (0, "expr"), (2, "expr")),
|
"testfalse_not_or": ("not %c or %c", (0, "expr"), (2, "expr")),
|
||||||
|
Reference in New Issue
Block a user