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:
Jeremy Hylton 2006-04-04 14:26:39 +00:00
parent 768018592c
commit ed40ea1159
2 changed files with 39 additions and 25 deletions

View file

@ -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;