函数名称在python类中未定义
发布于 2021-01-29 19:37:10
我对python相对较新,并且在命名空间方面遇到一些问题。
class a:
def abc(self):
print "haha"
def test(self):
abc()
b = a()
b.abc() #throws an error of abc is not defined. cannot explain why is this so
关注者
0
被浏览
116
1 个回答