3.7+ "or" disambiguation and assert2 handling

This commit is contained in:
rocky
2020-01-10 20:44:28 -05:00
parent eba8f04e29
commit 6cef42f6c7
5 changed files with 33 additions and 6 deletions

View File

@@ -48,8 +48,8 @@ def customize_for_version(self, is_pypy, version):
#######################
TABLE_DIRECT.update({
# "assert" and "assert_expr" are added via transform rules.
"assert": ("%|assert %c\n", (0, "assert_expr")),
"assert2": ("%|assert %c, %c\n", (0, "assert_expr"), 3),
"assert": ("%|assert %c\n", 0),
"assert2": ("%|assert %c, %c\n", 0, 3),
# Created only via transformation
"assertnot": ("%|assert not %p\n", (0, PRECEDENCE['unary_not'])),