mirror of
https://github.com/python/cpython
synced 2026-09-29 09:25:29 +03:00
Don't generate spurious line number in try-except-finally. (#23760)
This commit is contained in:
parent
674fa0a740
commit
56aa20f9eb
4 changed files with 1752 additions and 1733 deletions
|
|
@ -3007,6 +3007,8 @@ compiler_try_finally(struct compiler *c, stmt_ty s)
|
|||
else {
|
||||
VISIT_SEQ(c, stmt, s->v.Try.body);
|
||||
}
|
||||
/* Mark code as artificial */
|
||||
c->u->u_lineno = -1;
|
||||
ADDOP(c, POP_BLOCK);
|
||||
compiler_pop_fblock(c, FINALLY_TRY, body);
|
||||
VISIT_SEQ(c, stmt, s->v.Try.finalbody);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue