diff options
Diffstat (limited to 'tests/basics/gen_yield_from_stopped.py')
-rw-r--r-- | tests/basics/gen_yield_from_stopped.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basics/gen_yield_from_stopped.py b/tests/basics/gen_yield_from_stopped.py index 468679b61..82feefed0 100644 --- a/tests/basics/gen_yield_from_stopped.py +++ b/tests/basics/gen_yield_from_stopped.py @@ -16,3 +16,15 @@ try: next(run()) except StopIteration: print("StopIteration") + + +# Where "f" is a native generator +def run(): + print((yield from f)) + + +f = zip() +try: + next(run()) +except StopIteration: + print("StopIteration") |