Skip to content

Commit 024a81c

Browse files
committed
Fix condition sense in except_handler.py reduction
1 parent a0f93f7 commit 024a81c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

uncompyle6/parsers/reducecheck/except_handler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
def except_handler(self, lhs, n, rule, ast, tokens, first, last):
44
end_token = tokens[last-1]
5+
6+
# print("XXX", first, last)
57
# for t in range(first, last):
68
# print(tokens[t])
79
# print("=" * 30)
810

911
# FIXME: Figure out why this doesn't work on
1012
# bytecode-1.4/anydbm.pyc
11-
if self.version != 1.4:
13+
if self.version == 1.4:
1214
return False
1315

1416
# Make sure come froms all come from within "except_handler".

uncompyle6/semantics/pysource.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,7 @@ def n_expr(self, node):
587587
if n == "LOAD_CONST" and repr(n.pattr)[0] == "-":
588588
self.prec = 6
589589

590-
# print(n.kind, p, "<", self.prec)
591-
# print(self.f.getvalue())
590+
# print("XXX", n.kind, p, "<", self.prec)
592591

593592
if p < self.prec:
594593
self.write("(")
@@ -604,7 +603,6 @@ def n_ret_expr(self, node):
604603
# If expr is yield we want parens.
605604
self.prec = PRECEDENCE["yield"] - 1
606605
self.n_expr(node[0])
607-
p = self.prec
608606
else:
609607
self.n_expr(node)
610608

0 commit comments

Comments
 (0)