[wingide-users] Stack Data / Watch should use __repr__

Ken Kinder kkinder at gmail.com
Thu Oct 12 16:17:26 MDT 2006


On Thursday 12 October 2006 2:03 pm, Peter Fein wrote:
> It'd be handy if the Value column of the Stack Data & Watch tools used
> user-defined __repr__ if available, instead of the builtin-style
> <mymod.myclass -0x12345678>.
>
> While I'm at it, the following should probably be excluded from display by
> default: __file__, __name__, __builtins__, __doc__, __module__,
> __weakref__, __dict__.  I've added these manually in prefs, but seems
> sensible.

Hmm, if there are very many objects, calling __repr__ could be slow. And since 
that invokes code in your project, it wouldn't be a strictly passive 
debugger...

On the other hand, memory address is just about never useful. Maybe you could 
right click and say, "For objects of this type, show this attribute." Like 
tell the debugger to show the "name" attribute for "Person" objects. Then 
again, that could be weird and complex.


More information about the wingide-users mailing list