https://github.com/python/cpython/commit/2e8dba3e1dce768e21998dccd58892fc7e6d8c42
commit: 2e8dba3e1dce768e21998dccd58892fc7e6d8c42
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: encukou <[email protected]>
date: 2024-07-19T13:50:51+02:00
summary:

[3.12] gh-121657: Additional `yield from` error test using lambda (GH-121722) 
(GH-121962)

(cherry picked from commit 1056f2bc208bdfe562c79d2a5098723c50ae9c23)

Co-authored-by: Gregor <[email protected]>

files:
M Lib/test/test_generators.py

diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 6bd78887bff66f..ea6eada07c58df 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -2145,6 +2145,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):
   ...

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to