summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-06-11 17:49:38 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-06-11 17:49:38 (GMT)
commitb266481ed8dba9164b03e72bab9c19712b938657 (patch)
tree3d3f5bd9e4a88feaf78dc9b3aff9488121f9262b /Python
parente5fa5fe8fcf2a654dbae1bd6b6b49c0887d859b4 (diff)
downloadcpython-b266481ed8dba9164b03e72bab9c19712b938657.zip
cpython-b266481ed8dba9164b03e72bab9c19712b938657.tar.gz
cpython-b266481ed8dba9164b03e72bab9c19712b938657.tar.bz2
revert r73361
Diffstat (limited to 'Python')
-rw-r--r--Python/ast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 8e1c530..2cc41b2 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -2120,6 +2120,10 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
for (i = 0; i < NCH(n) - 2; i += 2) {
expr_ty e;
node *ch = CHILD(n, i);
+ if (TYPE(ch) == yield_expr) {
+ ast_error(ch, "assignment to yield expression not possible");
+ return NULL;
+ }
e = ast_for_testlist(c, ch);
/* set context to assign */