]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-121657: Additional `yield from` error test using lambda (GH-121722) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 19 Jul 2024 11:50:51 +0000 (13:50 +0200)
committerGitHub <noreply@github.com>
Fri, 19 Jul 2024 11:50:51 +0000 (13:50 +0200)
(cherry picked from commit 1056f2bc208bdfe562c79d2a5098723c50ae9c23)

Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com>
Lib/test/test_generators.py

index 6bd78887bff66f320b6717fe753020079f2950ce..ea6eada07c58df79a677ab13d30fe18a5da80abd 100644 (file)
@@ -2145,6 +2145,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):
   ...