3 ms·
This is a great idea, although repr() would probably be better than str(). I've spent a lot of time debugging Python over the years. This honestly never occur
by the_real_bto 12y ago
This is a great idea, although repr() would probably be better than str().
I've spent a lot of time debugging Python over the years. This honestly never occured to me until you mentioned it.
Edit:
Everyone else jumped in before me. I think it would be useful as a command line switch to python to turn on the behavior (maybe call it extended exceptions).
Python would need to run the extended exception generation under a try/except that fell back to regular exceptions if an exception was raised while calling repr()