mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
gh-111123: symtable should visit exception handlers before the else block (#111142)
This commit is contained in:
parent
f71cd5394e
commit
b578e51f02
4 changed files with 25 additions and 2 deletions
|
@ -1813,14 +1813,14 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
|
|||
break;
|
||||
case Try_kind:
|
||||
VISIT_SEQ(st, stmt, s->v.Try.body);
|
||||
VISIT_SEQ(st, stmt, s->v.Try.orelse);
|
||||
VISIT_SEQ(st, excepthandler, s->v.Try.handlers);
|
||||
VISIT_SEQ(st, stmt, s->v.Try.orelse);
|
||||
VISIT_SEQ(st, stmt, s->v.Try.finalbody);
|
||||
break;
|
||||
case TryStar_kind:
|
||||
VISIT_SEQ(st, stmt, s->v.TryStar.body);
|
||||
VISIT_SEQ(st, stmt, s->v.TryStar.orelse);
|
||||
VISIT_SEQ(st, excepthandler, s->v.TryStar.handlers);
|
||||
VISIT_SEQ(st, stmt, s->v.TryStar.orelse);
|
||||
VISIT_SEQ(st, stmt, s->v.TryStar.finalbody);
|
||||
break;
|
||||
case Assert_kind:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue