Irit Katriel <iritkatr...@yahoo.com> added the comment:

The traceback is only one part of an exception. It is simply a list of frames 
that show where the exception travelled between being raised and being caught.

An exception contains information about an error, including the type of the 
exception, sometimes some parameters like an exception message, and sometimes a 
traceback.

When exception is just created and before it is ever raised, its traceback is 
None. But you can still print the rest of the information in it (its type and 
args). 

I guess you're saying that the __context__ exception of the TypeError in your 
example has an empty traceback, which means it was never raised, which doesn't 
make sense because then how did it end up being the __context__ of another 
exception?

Yeah, __context__ is in a funny state, and the traceback module doesn't try to 
inspect it and interpret what you may have meant by doing that, it just prints 
the exception like it prints any other exception and you get a funny output.

I still don't a bug.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30384>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to