Issue #16546: make ast.YieldFrom argument mandatory.

This commit is contained in:
Mark Dickinson 2012-11-25 14:36:26 +00:00
parent 9982c53c2f
commit ded35aeb9d
7 changed files with 36 additions and 24 deletions

View file

@ -224,8 +224,7 @@ validate_expr(expr_ty exp, expr_context_ty ctx)
case Yield_kind:
return !exp->v.Yield.value || validate_expr(exp->v.Yield.value, Load);
case YieldFrom_kind:
return !exp->v.YieldFrom.value ||
validate_expr(exp->v.YieldFrom.value, Load);
return validate_expr(exp->v.YieldFrom.value, Load);
case Compare_kind:
if (!asdl_seq_LEN(exp->v.Compare.comparators)) {
PyErr_SetString(PyExc_ValueError, "Compare with no comparators");