You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
22 lines
784 B
Python
22 lines
784 B
Python
# Tests:
|
|
#
|
|
# tryfinallystmt ::= SETUP_FINALLY suite_stmts POP_BLOCK LOAD_CONST COME_FROM suite_stmts_opt END_FINALLY
|
|
# suite_stmts_opt ::= suite_stmts
|
|
# trystmt ::= SETUP_EXCEPT suite_stmts_opt POP_BLOCK try_middle COME_FROM
|
|
# try_middle ::= JUMP_FORWARD COME_FROM except_stmts END_FINALLY COME_FROM
|
|
# except_stmt ::= except_cond1 except_suite
|
|
# except_cond1 ::= DUP_TOP expr COMPARE_OP jmp_false POP_TOP POP_TOP POP_TOP
|
|
# trystmt ::= SETUP_EXCEPT suite_stmts_opt POP_BLOCK try_middle COME_FROM
|
|
# try_middle ::= JUMP_FORWARD COME_FROM except_stmts END_FINALLY COME_FROM
|
|
# except_cond1 ::= DUP_TOP expr COMPARE_OP jmp_false POP_TOP POP_TOP POP_TOP
|
|
try:
|
|
try:
|
|
x = 1
|
|
except AssertionError:
|
|
x = 2
|
|
|
|
except ImportError:
|
|
x = 3
|
|
finally:
|
|
x = 4
|