summaryrefslogtreecommitdiffstats
path: root/Python/graminit.c
diff options
context:
space:
mode:
authorDavid Cuthbert <dacut@kanga.org>2018-09-22 01:31:15 (GMT)
committerGuido van Rossum <guido@python.org>2018-09-22 01:31:15 (GMT)
commitfd97d1f1af910a6222ea12aec42c456b64f9aee4 (patch)
treee07d238eb81a7f526e40249b706d95b4ba4a4748 /Python/graminit.c
parent7279b5125e7c5d84a473d250b27d353cb7f6628e (diff)
downloadcpython-fd97d1f1af910a6222ea12aec42c456b64f9aee4.zip
cpython-fd97d1f1af910a6222ea12aec42c456b64f9aee4.tar.gz
cpython-fd97d1f1af910a6222ea12aec42c456b64f9aee4.tar.bz2
bpo-32117: Allow tuple unpacking in return and yield statements (gh-4509)
Iterable unpacking is now allowed without parentheses in yield and return statements, e.g. ``yield 1, 2, 3, *rest``. Thanks to David Cuthbert for the change and jChapman for added tests.
Diffstat (limited to 'Python/graminit.c')
-rw-r--r--Python/graminit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/graminit.c b/Python/graminit.c
index 5770e8f..0a681f7 100644
--- a/Python/graminit.c
+++ b/Python/graminit.c
@@ -613,7 +613,7 @@ static arc arcs_25_0[1] = {
{75, 1},
};
static arc arcs_25_1[2] = {
- {9, 2},
+ {47, 2},
{0, 1},
};
static arc arcs_25_2[1] = {
@@ -1900,7 +1900,7 @@ static state states_85[3] = {
};
static arc arcs_86_0[2] = {
{77, 1},
- {9, 2},
+ {47, 2},
};
static arc arcs_86_1[1] = {
{26, 2},
@@ -2087,7 +2087,7 @@ static dfa dfas[87] = {
{341, "yield_expr", 0, 3, states_85,
"\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\200\000"},
{342, "yield_arg", 0, 3, states_86,
- "\000\040\200\000\000\000\000\000\000\040\010\000\000\000\020\002\000\300\220\050\037\000\000"},
+ "\000\040\200\000\002\000\000\000\000\040\010\000\000\000\020\002\000\300\220\050\037\000\000"},
};
static label labels[177] = {
{0, "EMPTY"},