[wingide-users] Bug (or feature?) in the "Stack data" Tool Area
Wingware Support
support at wingware.com
Fri Sep 14 08:06:29 EDT 2012
Denis Kirienko wrote:
> Type the next program:
>
> class a:
> def b():
> pass
>
>
> Now press F7 three times. The debugger will stop on the "def b():"
> Open "Stack data" tool area and look to the locals variable. Inside
> it you can see dict "__locals__", which also has a key "__locals__"
> and so long.
> See the screenshot.
>
> Is it a bug or it is a python feature?
Apparently this is what Python 3.2 does. In that context:
>>> locals()
{'__module__': '__main__', '__locals__': {...}}
>>> locals()['__locals__']
{'__module__': '__main__', '__locals__': {...}}
>>> locals()['__locals__']['__locals__']
{'__module__': '__main__', '__locals__': {...}}
We may want to omit __locals__ from our display, though I'd like to
understand the motivation behind this better before we do that.
--
Stephan Deibel
Wingware | Python IDE
Advancing Software Development
www.wingware.com
More information about the wingide-users
mailing list