For instance, consider the case:
>>> a = []
>>> a[12]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range
the exception does not print the value that was out of range.
My guess is that we don't know if the __str__
function of whatever was passed in raises an exception, so we don't touch it?
The value could be printed, it just isn't.
However, there is a tb module on PyPI that actually will print the values of the variables in the stack trace.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With