diff Python/ast.c @ 54689:027444810e3f legacy-trunk

revert r73361
author Benjamin Peterson <benjamin@python.org>
date Thu, 11 Jun 2009 17:49:38 +0000
parents 96a0c3f6ef8b
children 5306b84d4fce
line wrap: on
line diff
--- a/Python/ast.c	Thu Jun 11 16:25:52 2009 +0000
+++ b/Python/ast.c	Thu Jun 11 17:49:38 2009 +0000
@@ -2120,6 +2120,10 @@
         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 */