summaryrefslogtreecommitdiff
path: root/tests/basics/gen_yield_from.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/gen_yield_from.py')
-rw-r--r--tests/basics/gen_yield_from.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/basics/gen_yield_from.py b/tests/basics/gen_yield_from.py
index 4e68aec63..037644e1e 100644
--- a/tests/basics/gen_yield_from.py
+++ b/tests/basics/gen_yield_from.py
@@ -13,34 +13,6 @@ g = gen2()
print(list(g))
-# Like above, but terminate subgen using StopIteration
-def gen3():
- yield 1
- yield 2
- raise StopIteration
-
-def gen4():
- print("here1")
- print((yield from gen3()))
- print("here2")
-
-g = gen4()
-print(list(g))
-
-# Like above, but terminate subgen using StopIteration with value
-def gen5():
- yield 1
- yield 2
- raise StopIteration(123)
-
-def gen6():
- print("here1")
- print((yield from gen5()))
- print("here2")
-
-g = gen6()
-print(list(g))
-
# StopIteration from within a Python function, within a native iterator (map), within a yield from
def gen7(x):
if x < 3: