Merge branch 'master' into python-2.4

This commit is contained in:
rocky
2020-07-25 13:34:59 -04:00
9 changed files with 34 additions and 17 deletions

View File

@@ -587,8 +587,7 @@ class SourceWalker(GenericASTTraversal, object):
if n == "LOAD_CONST" and repr(n.pattr)[0] == "-":
self.prec = 6
# print(n.kind, p, "<", self.prec)
# print(self.f.getvalue())
# print("XXX", n.kind, p, "<", self.prec)
if p < self.prec:
self.write("(")
@@ -604,7 +603,6 @@ class SourceWalker(GenericASTTraversal, object):
# If expr is yield we want parens.
self.prec = PRECEDENCE["yield"] - 1
self.n_expr(node[0])
p = self.prec
else:
self.n_expr(node)