Starting g1
Yielded g1 ham
Starting g2
Yielded g2 spam
Finishing g2
Finishing g1
Traceback (most recent call last):
  File "test9.py", line 17, in g2
    yield "g2 spam"
GeneratorExit

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test9.py", line 27, in <module>
    g.close()
  File "test9.py", line 9, in g1
    yield from g2()
  File "test9.py", line 21, in g2
    raise ValueError("nybbles have exploded with delight")
ValueError: nybbles have exploded with delight
