gh-143055: Implementation of PEP 798 (#143056)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
adam j hartz 2026-01-30 23:37:52 -05:00 committed by GitHub
parent 96e4cd698a
commit ccbe41e27c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 4069 additions and 2908 deletions

View file

@ -557,7 +557,9 @@ astfold_expr(expr_ty node_, PyArena *ctx_, _PyASTPreprocessState *state)
break;
case DictComp_kind:
CALL(astfold_expr, expr_ty, node_->v.DictComp.key);
CALL(astfold_expr, expr_ty, node_->v.DictComp.value);
if (node_->v.DictComp.value != NULL){
CALL(astfold_expr, expr_ty, node_->v.DictComp.value);
}
CALL_SEQ(astfold_comprehension, comprehension, node_->v.DictComp.generators);
break;
case GeneratorExp_kind: