with(traceback:)¶
Initializes a new exception with the given traceback.
Declaration
Parameters
traceback: A
Tracebackvalue.
Returns
A new exception with the traceback attached to it.
Discussion
Note
This doesn’t affect the __traceback__ attribute of the actual exception object.