我想你要:
class B(A): @property def attr(self): return super(B, self).attr
您提到要返回父类的getter,但是您需要调用getter而不是返回它。
上一篇 python 2,matplotlib 1.1.1中的pylab.ion()和程序运行时的绘图更新
下一篇 为什么我们使用@staticmethod?
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号