]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-121657: Additional `yield from` error test using lambda (GH-121722)
authorGregor <36135323+gege-hoho@users.noreply.github.com>
Thu, 18 Jul 2024 12:29:03 +0000 (14:29 +0200)
committerGitHub <noreply@github.com>
Thu, 18 Jul 2024 12:29:03 +0000 (14:29 +0200)
Lib/test/test_generators.py

index 34f79dafbe98510753a62418439092398cefc10e..3cb4d51fff1eeb344bc30c7f0f2ee99d64dfa719 100644 (file)
@@ -2247,6 +2247,11 @@ Traceback (most recent call last):
   ...
 SyntaxError: 'yield' outside function
 
+>>> f=lambda: (yield from (1,2)), (yield from (3,4))
+Traceback (most recent call last):
+  ...
+SyntaxError: 'yield from' outside function
+
 >>> yield from [1,2]
 Traceback (most recent call last):
   ...