Showing the method's class in expection's traceback

Agustin Villena agustin.villena at gmail.com
Wed May 21 19:45:49 EDT 2008


> And not that useful - why would one care about the function being
> defined in class X or Y when one have the exact file and line ?

I have 3 reasons:

1) My developing time is expended running unit tests and browsing
tracebacks to find which is the real problem. Knowing the offender
class (instead of the method alone) makes me understand more quickly
which component of my software is failing.
2) There are some ocassions where I only have the traceback (e.g. when
analyzing an app's log) and no inmediate access to teh source code
3) And finally, for completeness: If a function is really a method, if
the traceback show only its name and not the class that defines it,
for me its a bug, because the method name has no sense out of its
class.

Just my two cents

Agustin




More information about the Python-list mailing list