class Controller:
def __init__(self):
self.__whiteList = self.readFile('whiteList.txt')
a = 0
def getWhiteList(self):
return self.__whiteList
Well, I set a breakpoint at a = 0.
When I stop at a breakpoint, I want to evaluate __whiteList.
Error:
AttributeError:'Controller' object has no attribute '__whiteList'
Well, this is a mystery to me. Since I have a getter method outside of the class, it works just fine.
Well, you can tell me that I could easily ignore this, since it works outside the classroom. But I need this during debugging.
Could you comment on why I cannot catch the value at the breakpoint?
source
share