在 Python 3 中,如何在另一个类方法中调用继承的方法?
class A:
name = 'foo'
def get_name(self):
return self.name
class B(A):
@classmethod
def do_other(cls):
cls.get_name()
在 cls.get_name() 中,它抱怨“参数“self”未填充”。我怎样才能克服这个问题而不必将 do_other 更改为常规方法?