Showing the method's class in expection's traceback

Richard G Riley rileyrgdev at gmail.com
Wed May 21 10:27:08 EDT 2008


Bruno Desthuilliers <bruno.42.desthuilliers at websiteburo.invalid> writes:

> Richard G Riley a écrit :
>> Bruno Desthuilliers <bruno.42.desthuilliers at websiteburo.invalid> writes:
>
> (snip)
>
>>> 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 ?
>>
>> Very obvious I would think. One can develop ones own interactive class
>> browser and code navigator.
>
> From the traceback ?
>
>>  One can not bring up class help from "line 3
>> in x.py" but one can from "classname : MyClass at line 2 in z.py". With
>> the class name I can navigate directly to all sorts of class related
>> information without the need to delve into a physical usage of it e.g
>> program.py at line 3.
>
> Please bear with me, but I'm afraid I still don't get the point : I
> don't need tracebacks to get to some object's info (help etc).

This is a view quite common to people when they are happy with what they
have. Some like to improve what they have. It is immediately apparent to
me why having a class name and method name in the traceback would be
immediately useful. Having written a few extensions to IDEs in the past
I know it would help me, and I suspect, the original poster. As a recent
"recruit" to Python I am quite surprised as how poor most of the query
like tools in the python shell are. The first thing I did was to move to
iPython. Still, horses for courses.





More information about the Python-list mailing list