From d60457a6673cf0263213c2f2be02c633ec2e2038 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Tue, 14 Dec 2021 16:48:15 +0000 Subject: bpo-45292: [PEP-654] add except* (GH-29581) --- Python/ast_opt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Python/ast_opt.c') diff --git a/Python/ast_opt.c b/Python/ast_opt.c index 5f219c6f4bb..2821e69a355 100644 --- a/Python/ast_opt.c +++ b/Python/ast_opt.c @@ -972,6 +972,12 @@ astfold_stmt(stmt_ty node_, PyArena *ctx_, _PyASTOptimizeState *state) CALL_SEQ(astfold_stmt, stmt, node_->v.Try.orelse); CALL_SEQ(astfold_stmt, stmt, node_->v.Try.finalbody); break; + case TryStar_kind: + CALL_SEQ(astfold_stmt, stmt, node_->v.TryStar.body); + CALL_SEQ(astfold_excepthandler, excepthandler, node_->v.TryStar.handlers); + CALL_SEQ(astfold_stmt, stmt, node_->v.TryStar.orelse); + CALL_SEQ(astfold_stmt, stmt, node_->v.TryStar.finalbody); + break; case Assert_kind: CALL(astfold_expr, expr_ty, node_->v.Assert.test); CALL_OPT(astfold_expr, expr_ty, node_->v.Assert.msg); -- cgit v1.2.3