From 01273dffdd4f04e3e1b4334a589d56c9d4ddbc12 Mon Sep 17 00:00:00 2001 From: Gregor <36135323+gege-hoho@users.noreply.github.com> Date: Thu, 18 Jul 2024 14:29:03 +0200 Subject: [PATCH] gh-121657: Additional `yield from` error test using lambda (GH-121722) (cherry picked from commit 1056f2bc208bdfe562c79d2a5098723c50ae9c23) Co-authored-by: Gregor <36135323+gege-hoho@users.noreply.github.com> --- Lib/test/test_generators.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index fd3e88f1185864..6203db8939aa79 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -2247,6 +2247,11 @@ def printsolution(self, x): ... 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): ...