mirror of
https://github.com/python/cpython.git
synced 2025-07-18 00:35:17 +00:00
bpo-35814: Allow same r.h.s. in annotated assignments as in normal ones (GH-11667)
This commit is contained in:
parent
1396d8fab4
commit
62c35a8a8f
6 changed files with 23 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -498,8 +498,9 @@ static arc arcs_17_2[2] = {
|
|||
{31, 3},
|
||||
{0, 2},
|
||||
};
|
||||
static arc arcs_17_3[1] = {
|
||||
{26, 4},
|
||||
static arc arcs_17_3[2] = {
|
||||
{50, 4},
|
||||
{9, 4},
|
||||
};
|
||||
static arc arcs_17_4[1] = {
|
||||
{0, 4},
|
||||
|
@ -508,7 +509,7 @@ static state states_17[5] = {
|
|||
{1, arcs_17_0},
|
||||
{1, arcs_17_1},
|
||||
{2, arcs_17_2},
|
||||
{1, arcs_17_3},
|
||||
{2, arcs_17_3},
|
||||
{1, arcs_17_4},
|
||||
};
|
||||
static arc arcs_18_0[2] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue