Skip to content

Commit 01273df

Browse files
gege-hohomiss-islington
authored andcommitted
pythongh-121657: Additional yield from error test using lambda (pythonGH-121722)
(cherry picked from commit 1056f2b) Co-authored-by: Gregor <[email protected]>
1 parent afa5321 commit 01273df

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_generators.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2247,6 +2247,11 @@ def printsolution(self, x):
22472247
...
22482248
SyntaxError: 'yield' outside function
22492249
2250+
>>> f=lambda: (yield from (1,2)), (yield from (3,4))
2251+
Traceback (most recent call last):
2252+
...
2253+
SyntaxError: 'yield from' outside function
2254+
22502255
>>> yield from [1,2]
22512256
Traceback (most recent call last):
22522257
...

0 commit comments

Comments
 (0)