python类内部调用自己的成员函数必须加self

class A:
    def a(self):
        print("hello world")
    
    def b(self):
        return self.a()

 

posted @ 2020-10-21 13:04  胸怀丶若谷  阅读(2378)  评论(0编辑  收藏  举报