summaryrefslogtreecommitdiff
path: root/Python/ast.c
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2012-11-25 14:36:26 +0000
committerMark Dickinson <mdickinson@enthought.com>2012-11-25 14:36:26 +0000
commit5cd62b7fe17e8004a4f137cf9164e4e71bb1bd70 (patch)
tree9c1de9548873ed64ed849a3de5997b9cec1f3aff /Python/ast.c
parentfbce793218005f0778f70a840b1e2bf688f9bb0f (diff)
downloadcpython-5cd62b7fe17e8004a4f137cf9164e4e71bb1bd70.tar.gz
Issue #16546: make ast.YieldFrom argument mandatory.
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 0c0c1a68d9..7657b22459 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -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");