You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
Fix 3.0 try except bug
This commit is contained in:
BIN
test/bytecode_3.0/02_try_except_except.pyc
Normal file
BIN
test/bytecode_3.0/02_try_except_except.pyc
Normal file
Binary file not shown.
9
test/simple_source/bug30/02_try_except_except.py
Normal file
9
test/simple_source/bug30/02_try_except_except.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# From 3.0.1/lib/python3.0/_dummy_thread.py
|
||||||
|
|
||||||
|
def start_new_thread(function, args, kwargs={}):
|
||||||
|
try:
|
||||||
|
function()
|
||||||
|
except SystemExit:
|
||||||
|
pass
|
||||||
|
except:
|
||||||
|
args()
|
@@ -65,11 +65,12 @@ class Python30Parser(Python31Parser):
|
|||||||
comp_iter ::= expr expr SET_ADD
|
comp_iter ::= expr expr SET_ADD
|
||||||
comp_iter ::= expr expr LIST_APPEND
|
comp_iter ::= expr expr LIST_APPEND
|
||||||
|
|
||||||
jump_forward_else ::= JUMP_FORWARD POP_TOP
|
jump_forward_else ::= JUMP_FORWARD POP_TOP
|
||||||
jump_absolute_else ::= JUMP_ABSOLUTE POP_TOP
|
jump_absolute_else ::= JUMP_ABSOLUTE POP_TOP
|
||||||
except_suite ::= c_stmts POP_EXCEPT jump_except POP_TOP
|
except_suite ::= c_stmts POP_EXCEPT jump_except POP_TOP
|
||||||
except_suite_finalize ::= SETUP_FINALLY c_stmts_opt except_var_finalize END_FINALLY
|
except_suite_finalize ::= SETUP_FINALLY c_stmts_opt except_var_finalize END_FINALLY
|
||||||
_jump POP_TOP
|
_jump POP_TOP
|
||||||
|
jump_except ::= JUMP_FORWARD POP_TOP
|
||||||
|
|
||||||
# In many ways 3.0 is like 2.6. The below rules in fact are the same or similar.
|
# In many ways 3.0 is like 2.6. The below rules in fact are the same or similar.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user