bpo-31344: Per-frame control of trace events by ncoghlan · Pull Request #3417 · python/cpython (original) (raw)

perhaps change the wording to:

and may result in surprising undefined behavior if an exception escapes the trace function.

i'm trying to make it more explicit that we do not guarantee any behavior when exceptions are allowed to escape during opcode tracing. changing "are raised by" to something involving "escape" makes it clear that exceptions can be raised and handled. the important thing is that they are resolved before the function exits.