Skip to content

Commit 2e8dba3

Browse files
[3.12] gh-121657: Additional yield from error test using lambda (GH-121722) (GH-121962)
(cherry picked from commit 1056f2b) Co-authored-by: Gregor <[email protected]>
1 parent 88618d2 commit 2e8dba3

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
@@ -2145,6 +2145,11 @@ def printsolution(self, x):
21452145
...
21462146
SyntaxError: 'yield' outside function
21472147
2148+
>>> f=lambda: (yield from (1,2)), (yield from (3,4))
2149+
Traceback (most recent call last):
2150+
...
2151+
SyntaxError: 'yield from' outside function
2152+
21482153
>>> yield from [1,2]
21492154
Traceback (most recent call last):
21502155
...

0 commit comments

Comments
 (0)