Bug report
Bug description:
def gen(): yield 1 def f(): breakpoint() g = gen() try: g.throw(TypeError) except TypeError: pass # line 10 f()
b 10
c
Traceback (most recent call last):
File "/home/gaogaotiantian/programs/mycpython/scrabble.py", line 12, in <module>
f()
~^^
File "/home/gaogaotiantian/programs/mycpython/scrabble.py", line 8, in f
g.throw(TypeError)
~~~~~~~^^^^^^^^^^^
File "/home/gaogaotiantian/programs/mycpython/scrabble.py", line 1, in gen
def gen():
ValueError: Cannot disable PY_THROW events. Callback removed.
PY_THROW can't be disabled.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux