unmap_dict -> dict_doublestar ...

This matches Python's AST (Dict) better. Variations or specializations
of an AST name, e.g. "unmap" should come at the end, not the beginning.
This commit is contained in:
rocky
2021-12-23 22:24:45 -05:00
parent 30aad42aae
commit 23551ea70f
6 changed files with 13 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ def customize_for_version35(self, version):
(2, "store"),
3,
),
"unmap_dict": ("{**%C}", (0, -1, ", **")),
"dict_unmap": ("{**%C}", (0, -1, ", **")),
# "unmapexpr": ( "{**%c}", 0), # done by n_unmapexpr
}
)

View File

@@ -44,7 +44,7 @@ def customize_for_version36(self, version):
PRECEDENCE["call_ex_kw2"] = 1
PRECEDENCE["call_ex_kw3"] = 1
PRECEDENCE["call_ex_kw4"] = 1
PRECEDENCE["unmap_dict"] = 0
PRECEDENCE["dict_unmap"] = 0 # **{ ... }
PRECEDENCE["formatted_value1"] = 100
TABLE_DIRECT.update(

View File

@@ -38,7 +38,6 @@ def customize_for_version37(self, version):
PRECEDENCE["formatted_value1"] = 100
PRECEDENCE["if_exp_37a"] = 28
PRECEDENCE["if_exp_37b"] = 28
PRECEDENCE["unmap_dict"] = 0
TABLE_DIRECT.update(
{
@@ -161,7 +160,7 @@ def customize_for_version37(self, version):
"testfalsel": ("not %c", (0, "expr")),
"try_except36": ("%|try:\n%+%c%-%c\n\n", 1, -2),
"tryfinally36": ("%|try:\n%+%c%-%|finally:\n%+%c%-\n\n", (1, "returns"), 3),
"unmap_dict": ("{**%C}", (0, -1, ", **")),
"dict_unmap": ("{**%C}", (0, -1, ", **")),
"unpack_list": ("*%c", (0, "list")),
"yield_from": ("yield from %c", (0, "expr")),
}