2.7 tryelse rule check disambiguation.

This commit is contained in:
rocky
2020-02-01 04:05:50 -05:00
parent 2d1ea6b02b
commit 451b18ee57
2 changed files with 9 additions and 2 deletions

View File

@@ -7,6 +7,8 @@ def tryelsestmt(self, lhs, n, rule, ast, tokens, first, last):
# inside the except handler to the end. If that happens
# then this is a "try" with no "else".
except_handler = ast[3]
if except_handler == "except_handler_else":
except_handler = except_handler[0]
if except_handler == "except_handler":
come_from = except_handler[-1]