mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
unify TryExcept and TryFinally (closes #12199)
This commit is contained in:
parent
f7d08e8522
commit
43af12b0b4
8 changed files with 78 additions and 156 deletions
|
@ -1211,14 +1211,11 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
|
|||
}
|
||||
}
|
||||
break;
|
||||
case TryExcept_kind:
|
||||
VISIT_SEQ(st, stmt, s->v.TryExcept.body);
|
||||
VISIT_SEQ(st, stmt, s->v.TryExcept.orelse);
|
||||
VISIT_SEQ(st, excepthandler, s->v.TryExcept.handlers);
|
||||
break;
|
||||
case TryFinally_kind:
|
||||
VISIT_SEQ(st, stmt, s->v.TryFinally.body);
|
||||
VISIT_SEQ(st, stmt, s->v.TryFinally.finalbody);
|
||||
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.finalbody);
|
||||
break;
|
||||
case Assert_kind:
|
||||
VISIT(st, expr, s->v.Assert.test);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue