From: Benjamin Peterson Date: Thu, 11 Jun 2009 17:49:38 +0000 (+0000) Subject: revert r73361 X-Git-Tag: v2.7a1~978 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b266481ed8dba9164b03e72bab9c19712b938657;p=python revert r73361 --- diff --git a/Python/ast.c b/Python/ast.c index 8e1c53055a..2cc41b274f 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 */