mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
gh-143055: Implementation of PEP 798 (#143056)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
+4
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user