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
14 changed files with 4069 additions and 2908 deletions
+4 -2
View File
@@ -305,8 +305,10 @@ validate_expr(expr_ty exp, expr_context_ty ctx)
#undef COMP
case DictComp_kind:
ret = validate_comprehension(exp->v.DictComp.generators) &&
validate_expr(exp->v.DictComp.key, Load) &&
validate_expr(exp->v.DictComp.value, Load);
validate_expr(exp->v.DictComp.key, Load);
if (ret && exp->v.DictComp.value != NULL){
ret = validate_expr(exp->v.DictComp.value, Load);
}
break;
case Yield_kind:
ret = !exp->v.Yield.value || validate_expr(exp->v.Yield.value, Load);