summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 8f2da7d..9b4e342 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -928,6 +928,16 @@ Test the __name__ attribute and the repr()
'f'
>>> repr(g) # doctest: +ELLIPSIS
'<generator object f at ...>'
+
+Lambdas shouldn't have their usual return behavior.
+
+>>> x = lambda: (yield 1)
+>>> list(x())
+[1]
+
+>>> x = lambda: ((yield 1), (yield 2))
+>>> list(x())
+[1, 2]
"""
# conjoin is a simple backtracking generator, named in honor of Icon's