Skip to content

Commit b266481

Browse files
committed
revert r73361
1 parent e5fa5fe commit b266481

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/ast.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2120,6 +2120,10 @@ ast_for_expr_stmt(struct compiling *c, const node *n)
21202120
for (i = 0; i < NCH(n) - 2; i += 2) {
21212121
expr_ty e;
21222122
node *ch = CHILD(n, i);
2123+
if (TYPE(ch) == yield_expr) {
2124+
ast_error(ch, "assignment to yield expression not possible");
2125+
return NULL;
2126+
}
21232127
e = ast_for_testlist(c, ch);
21242128

21252129
/* set context to assign */

0 commit comments

Comments
 (0)