我知道我能做到:
class Foo(Object):
@classmethod
def run(cls):
// do stuff
class Bar(Foo):
@classmethod:
def run(cls):
super(Bar, cls).run()
// do more stuff
但是,我想做的更多的是super(cls.__name__, cls).run()
。不幸的是,这不起作用,错误:
super(cls.__name__, cls).run(cls)
TypeError: must be type, not str