]> granicus.if.org Git - python/commitdiff
revert r73361
authorBenjamin Peterson <benjamin@python.org>
Thu, 11 Jun 2009 17:49:38 +0000 (17:49 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 11 Jun 2009 17:49:38 +0000 (17:49 +0000)
Python/ast.c

index 8e1c53055ad0fc47f8e84b98a6af3bf608b9aafd..2cc41b274f16e015147f28587585e79dc98f2a53 100644 (file)
@@ -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 */