Skip to content

Commit 1056f2b

Browse files
authored
gh-121657: Additional yield from error test using lambda (GH-121722)
1 parent 3eacfc1 commit 1056f2b

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)