Skip to content

Commit 02bd4f0

Browse files
dacutjChapman
authored andcommitted
Fix yield statements to allow unpacking without parenthesis.
1 parent 53ffbdd commit 02bd4f0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Grammar/Grammar

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,4 @@ comp_if: 'if' test_nocond [comp_iter]
147147
encoding_decl: NAME
148148

149149
yield_expr: 'yield' [yield_arg]
150-
yield_arg: 'from' test | testlist
150+
yield_arg: 'from' test | testlist_star_expr

Python/graminit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,7 +1900,7 @@ static state states_85[3] = {
19001900
};
19011901
static arc arcs_86_0[2] = {
19021902
{77, 1},
1903-
{9, 2},
1903+
{47, 2},
19041904
};
19051905
static arc arcs_86_1[1] = {
19061906
{26, 2},
@@ -2087,7 +2087,7 @@ static dfa dfas[87] = {
20872087
{341, "yield_expr", 0, 3, states_85,
20882088
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000"},
20892089
{342, "yield_arg", 0, 3, states_86,
2090-
"\000\040\200\000\000\000\000\000\000\040\010\000\000\000\020\002\000\300\220\050\037\000\000"},
2090+
"\000\040\200\000\002\000\000\000\000\040\010\000\000\000\020\002\000\300\220\050\037\000\000"},
20912091
};
20922092
static label labels[177] = {
20932093
{0, "EMPTY"},

0 commit comments

Comments
 (0)