commit | 62c35a8a8ff5854ed470b1c16a7a14f3bb80368c | [log] [tgz] |
---|---|---|
author | Ivan Levkivskyi <levkivskyi@gmail.com> | Fri Jan 25 01:39:19 2019 +0000 |
committer | GitHub <noreply@github.com> | Fri Jan 25 01:39:19 2019 +0000 |
tree | c9fbcd76316803a7d1272301a64a3c3ea233d2bd | |
parent | 1396d8fab4d0ae830d45f4937322bbb43ce0c30e [diff] [blame] |
bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones (GH-11667)
diff --git a/Python/ast.c b/Python/ast.c index 6560026..e10e63f 100644 --- a/Python/ast.c +++ b/Python/ast.c
@@ -3163,7 +3163,12 @@ } 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; }