From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 19 Jul 2024 11:50:51 +0000 (+0200) Subject: [3.12] gh-121657: Additional `yield from` error test using lambda (GH-121722) (GH... X-Git-Tag: v3.12.5~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e8dba3e1dce768e21998dccd58892fc7e6d8c42;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-121657: Additional `yield from` error test using lambda (GH-121722) (GH-121962) (cherry picked from commit 1056f2bc208bdfe562c79d2a5098723c50ae9c23) Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com> --- diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index 6bd78887bff6..ea6eada07c58 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -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): ...