mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
[3.13] gh-123344: Add missing ast optimizations for PEP 696 (GH-123377) (#123427)
(cherry picked from commit be083cee34
)
Co-authored-by: Bogdan Romanyuk <65823030+wrongnull@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
fbc975223b
commit
19a1f18740
3 changed files with 99 additions and 9 deletions
|
@ -1086,10 +1086,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue