bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones (GH-11667)

This commit is contained in:
Ivan Levkivskyi 2019-01-25 01:39:19 +00:00 committed by GitHub
parent 1396d8fab4
commit 62c35a8a8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 6 deletions

View file

@ -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;
}