From 62c35a8a8ff5854ed470b1c16a7a14f3bb80368c Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Fri, 25 Jan 2019 01:39:19 +0000 Subject: bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones (GH-11667) --- Python/ast.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Python/ast.c') diff --git a/Python/ast.c b/Python/ast.c index 6560026109..e10e63f539 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3163,7 +3163,12 @@ ast_for_expr_stmt(struct compiling *c, const node *n) } else { ch = CHILD(ann, 3); - expr3 = ast_for_expr(c, ch); + if (TYPE(ch) == testlist) { + expr3 = ast_for_testlist(c, ch); + } + else { + expr3 = ast_for_expr(c, ch); + } if (!expr3) { return NULL; } -- cgit v1.2.1