1

Closed

Hovering on "self.f" in a method when f is defined in an outer scope displays wrong value

description

Consider the code:
print('hi')
x = 100
for i in xrange(100):
    print(i)

f = 100

class C(object):
    def f(self):
        print(self.f)
        pass

a = C()
a.f()
Set a breakpoint in C.f, and hover on "self.f" inside of the method. The tooltip displays 100 instead of the method info.

file attachments

Closed Aug 20, 2013 at 10:44 PM by ZachA
Fixed in 2.0RC

comments

dinov wrote Nov 28, 2012 at 11:59 PM

We might just be evaluating f instead of self.f

pminaev wrote Aug 16, 2013 at 8:54 PM

The problem here was the lack of proper expression boundary detection for debugger data tips. So the fixes for https://pytools.codeplex.com/workitem/1609 and https://pytools.codeplex.com/workitem/1654 also fix this.