I am relatively new to python and i am experiencing some issues with namespacing.
class a:
def abc(self):
print "haha"
def test(self):
abc()
b = a()
b.test() #throws an error of abc is not defined. cannot explain why is this so
abc()ofclass ais called by its instance. - Vivek Sableb.abc(), yours call tob.test()should be throwing the error. And that's because you should be callingabc()with the reference of the class instance. Simply replaceabc()withself.abc()intest()function ofclass a. - Anonymous