mirror of
https://github.com/python/cpython.git
synced 2025-07-27 21:24:32 +00:00
Generate line number table entries for except handlers.
Re-enable all the tests in test_trace.py except one. Still not sure that these tests test what they used to test, but they pass. One failing test seems to be caused by undocumented line number table behavior in Python 2.4.
This commit is contained in:
parent
768018592c
commit
ed40ea1159
2 changed files with 39 additions and 25 deletions
|
@ -2398,6 +2398,8 @@ compiler_try_except(struct compiler *c, stmt_ty s)
|
|||
s->v.TryExcept.handlers, i);
|
||||
if (!handler->type && i < n-1)
|
||||
return compiler_error(c, "default 'except:' must be last");
|
||||
c->u->u_lineno_set = false;
|
||||
c->u->u_lineno = handler->lineno;
|
||||
except = compiler_new_block(c);
|
||||
if (except == NULL)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue