You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
2.7 control-flow bug: except/pass in loop
This commit is contained in:
@@ -150,7 +150,7 @@ pcheck-bytecode-2.6:
|
||||
|
||||
#: Check deparsing Python 2.7
|
||||
check-bytecode-2.7:
|
||||
$(PYTHON) test_pythonlib.py --bytecode-2.7 --verify
|
||||
$(PYTHON) test_pythonlib.py --bytecode-2.7 --weak-verify
|
||||
|
||||
#: Check deparsing Python 3.0
|
||||
check-bytecode-3.0:
|
||||
|
@@ -16,3 +16,17 @@ for a in [__name__]:
|
||||
try:len(a)
|
||||
except:continue
|
||||
y = 2
|
||||
|
||||
# From 2.7.14 decimal.py
|
||||
# Bug is in handling a CONTINUE op as a result of it being inside
|
||||
# an except in a loop
|
||||
def foo(self, error, ordered_errors, vals, funct, Signals):
|
||||
for error in ordered_errors:
|
||||
try:
|
||||
funct(*vals)
|
||||
except error:
|
||||
pass
|
||||
except Signals as e:
|
||||
error = e
|
||||
else:
|
||||
error = 5
|
||||
|
@@ -53,6 +53,8 @@ class Python27Parser(Python2Parser):
|
||||
|
||||
except_cond2 ::= DUP_TOP expr COMPARE_OP
|
||||
jmp_false POP_TOP designator POP_TOP
|
||||
|
||||
except_suite ::= c_stmts_opt CONTINUE
|
||||
"""
|
||||
|
||||
def p_jump27(self, args):
|
||||
|
Reference in New Issue
Block a user