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.