[wingide-users] stack data view doesn't display the return value of __repr__() for objects

Wingware Support support at wingware.com
Fri Aug 12 12:23:42 EDT 2005


Interesting -- this sort of invalidates my response doesn't it? ;-) 
I'll look into whether I'm wrong about safety of calling __repr__ or 
whether we've got a potential bug showing it in the short view of 
locals().

Thanks,

Stephan Deibel

--
Wingware
Wing IDE for Python
Advancing Software Development

www.wingware.com

On Thu, 11 Aug 2005, Gigi wrote:

> Hi, sorry for the fragmented post. I Forgot to paste the code. Here it is:
> 
> class A(object):
>     def __repr__(self):
>         return '<Yeahh, it works!!!>'
> 
> a = A()
> print 'str(a)=', str(a)
> print 'repr(a)=', repr(a)
> 
> 
> I'll add only that even in the stack data view 'a' appears properly in
> the value of the locals() dictionary:
> 
> {'a': <Yeahh, it works!!!>}
> 
> My stack data view looks like that:
> 
> Variable               | Value
> [-]locals                 {'a': <Yeahh, it works!!!>}
>    a                        <__main__.A 0xb41bf0>  
> [+]globals
> 
> But the value of the variable a itself is the default __repr__.
> 
> Thanks, Gigi
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide
> 


More information about the wingide-users mailing list