相关疑难解决方法(0)

super(类型(self),self)的快捷方式

我经常在覆盖子类中的方法时执行此操作:

def method_x(self):
    x = super(type(self), self).method_x()

    [Some extra code]
    return x
Run Code Online (Sandbox Code Playgroud)

我的问题是:超级(类型(自我),自我)是否有捷径?

python

8
推荐指数
1
解决办法
3847
查看次数

标签 统计

python ×1