Leaky abstractions and CPython performance

I must have misread you then, because that’s exactly what I thought you were proposing (other than naming).

So let me ask again, what API are you proposing?

Maybe tb_create() API is too high level, and we should add a public C API to create a traceback object from a frame object. There are already APIs to build a frame object for a specific filename and line number, no?

It seems like nobody actually wants to spend the time to design a proper API for this use case. So let’s all just drop the discussion. If you don’t agree with this characterization of the discussion, please do spend the time and propose a specific solution.