Skip to content

Commit 47e3ac3

Browse files
dacutjChapman
authored andcommitted
Add test for yield tuple unpacking.
1 parent 02bd4f0 commit 47e3ac3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_grammar.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,8 @@ def g(): f((yield 1))
987987
def g(): f((yield 1), 1)
988988
def g(): f((yield from ()))
989989
def g(): f((yield from ()), 1)
990+
# Do not require parenthesis for tuple unpacking
991+
def g(): rest = 4, 5, 6; yield 1, 2, 3, *rest
990992
check_syntax_error(self, "def g(): f(yield 1)")
991993
check_syntax_error(self, "def g(): f(yield 1, 1)")
992994
check_syntax_error(self, "def g(): f(yield from ())")

0 commit comments

Comments
 (0)