M.-A. Lemburg wrote:
Nick Coghlan wrote:
When Python code calls into Pyrex/C code which then call back into Python, I understand they insert dummy frames into the tracebacks to make the call stack more complete.
I suppose they do this for better error reporting, right ?
This is one reason I would like to be able to have traceback objects without a corresponding frame. Having to create an entire frame just to have somewhere to put the file name is very annoying.
Also, being able to remove the whole frame from a traceback object seems like a cleaner and more complete way to implement what the OP wanted.