diff options
Diffstat (limited to 'Python/ast_opt.c')
-rw-r--r-- | Python/ast_opt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/ast_opt.c b/Python/ast_opt.c index 807de98ab5e..4d5e5589ac0 100644 --- a/Python/ast_opt.c +++ b/Python/ast_opt.c @@ -558,9 +558,16 @@ astfold_expr(expr_ty node_, PyArena *ctx_, _PyASTOptimizeState *state) CALL(astfold_expr, expr_ty, node_->v.FormattedValue.value); CALL_OPT(astfold_expr, expr_ty, node_->v.FormattedValue.format_spec); break; + case Interpolation_kind: + CALL(astfold_expr, expr_ty, node_->v.Interpolation.value); + CALL_OPT(astfold_expr, expr_ty, node_->v.Interpolation.format_spec); + break; case JoinedStr_kind: CALL_SEQ(astfold_expr, expr, node_->v.JoinedStr.values); break; + case TemplateStr_kind: + CALL_SEQ(astfold_expr, expr, node_->v.TemplateStr.values); + break; case Attribute_kind: CALL(astfold_expr, expr_ty, node_->v.Attribute.value); break; |