diff options
author | Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com> | 2024-08-28 13:38:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 13:38:56 (GMT) |
commit | be083cee34d62ae860acac70dfa078fc5c96ade3 (patch) | |
tree | 55e503c7838737064e57fd0d44ef2af12f35f61b /Python/ast_opt.c | |
parent | 9e108b8719752a0a2e390eeeaa8f52391f75120d (diff) | |
download | cpython-be083cee34d62ae860acac70dfa078fc5c96ade3.zip cpython-be083cee34d62ae860acac70dfa078fc5c96ade3.tar.gz cpython-be083cee34d62ae860acac70dfa078fc5c96ade3.tar.bz2 |
gh-123344: Add missing ast optimizations for PEP 696 (#123377)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Python/ast_opt.c')
-rw-r--r-- | Python/ast_opt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/ast_opt.c b/Python/ast_opt.c index d7a26e6..503715e 100644 --- a/Python/ast_opt.c +++ b/Python/ast_opt.c @@ -1087,10 +1087,13 @@ astfold_type_param(type_param_ty node_, PyArena *ctx_, _PyASTOptimizeState *stat switch (node_->kind) { case TypeVar_kind: CALL_OPT(astfold_expr, expr_ty, node_->v.TypeVar.bound); + CALL_OPT(astfold_expr, expr_ty, node_->v.TypeVar.default_value); break; case ParamSpec_kind: + CALL_OPT(astfold_expr, expr_ty, node_->v.ParamSpec.default_value); break; case TypeVarTuple_kind: + CALL_OPT(astfold_expr, expr_ty, node_->v.TypeVarTuple.default_value); break; } return 1; |