Fix 3.0 try except bug

This commit is contained in:
rocky
2018-06-23 00:06:35 -04:00
parent f331deb864
commit fa5da2b1ef
3 changed files with 13 additions and 3 deletions

Binary file not shown.

View 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()

View File

@@ -70,6 +70,7 @@ class Python30Parser(Python31Parser):
except_suite ::= c_stmts POP_EXCEPT jump_except POP_TOP
except_suite_finalize ::= SETUP_FINALLY c_stmts_opt except_var_finalize END_FINALLY
_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.