summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2012-11-25 14:36:26 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2012-11-25 14:36:26 (GMT)
commitded35aeb9d5ae1671174f10c0ae8a7166693b17c (patch)
tree4caa61589581de32b38d3da8ee8bd68e553094bf /Python/ast.c
parent9982c53c2feb6e6e03c4c6d87d77c6ee69bfc435 (diff)
downloadcpython-ded35aeb9d5ae1671174f10c0ae8a7166693b17c.zip
cpython-ded35aeb9d5ae1671174f10c0ae8a7166693b17c.tar.gz
cpython-ded35aeb9d5ae1671174f10c0ae8a7166693b17c.tar.bz2
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 0c0c1a6..7657b22 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");