[Python-ideas] Verbose traceback formatting

Terry Reedy tjreedy at udel.edu
Wed Aug 29 23:24:20 CEST 2012


On 8/28/2012 6:26 PM, Mike Graham wrote:
> It's possible to give a lot more on error than the default traceback
> gives you. I propose that Python should ship a more verbose formatter
> and a command line switch to use it.

Part of the problem is in the overly skimpy exception instances
themselves. They should contain the needed runtime info that one
cannot find in the code. I would rather you push for more such
changes.

 >> ...
 >>          x = 16
 >>          y = 0
 >> ...
 >>ZeroDivisionError: integer division or modulo by zero

This could and, imo, should be changed to include the numerator,
which is the main extra info included the the verbose traceback.
Most of the rest strikes me as noise.

ZeroDivisionError: integer division or modulo of 16 by 0

http://bugs.python.org/issue15815


-- 
Terry Jan Reedy




More information about the Python-ideas mailing list