[wingide-users] double-underscore (private) variables and the debug probe

Wingware Support support at wingware.com
Tue Apr 4 09:38:36 EDT 2006

On Tue, 4 Apr 2006, Chris Curvey wrote:
> Just curious if this is a feature or not.
> If I have a class like this:
> class Foo:
>     def bar(self):
>          self.__snafu = 1
>          self.doSomethingElse()
> and I set a breakpoint at doSomethingElse(), and try to interrogate
> "self.__snafu" in the debug probe, I'm told that "class Foo has no attribute
> __snafu".  Of course, this is just because of the name-mangling; if I
> interrogate self._Foo__snafu, then I get what I'm looking for.
> Any chance we could get Wing to do the name-mangling on its own?

Eventually, yes.  It's on our list to fix.  Hmm, this might be 
easier than I originally thought -- I think we can always replace 
self.__ with self._classname__ for the current stack frame as 
long as it's outside of a string.  I've been hesitant to mess 
with strings input into the debug probe but it might be a valid 

- Stephan

More information about the wingide-users mailing list