mirror of
https://github.com/python/cpython.git
synced 2025-09-03 07:28:59 +00:00
Issue #16546: make ast.YieldFrom argument mandatory.
This commit is contained in:
parent
9982c53c2f
commit
ded35aeb9d
7 changed files with 36 additions and 24 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue