Traceback spoofing
Terry Reedy
tjreedy at udel.edu
Fri May 21 21:42:19 EDT 2010
On 5/21/2010 7:22 PM, Zac Burns wrote:
> Why can't I inherit from traceback to 'spoof' tracebacks?
Because a) they are, at least in part, an internal implementation detail
of CPython, and b) even if you could, Python would use the builtin
original with exceptions, and c) you can probably do anything sensible
you want with them by wrapping them, as in, define a class with a
traceback as the main instance attribute.
More information about the Python-list
mailing list