python - Pycharm 警告 : must implement all abstract methods

标签 python inheritance warnings pycharm

代码

class A(object):
    def a(self):
        raise NotImplementedError

class B(A):
    def a(self):
        return 7

class C(B):
    pass

为什么 Pycharm 会报错?

Problem synopsis      Class C must implement all abstract methods

最佳答案

这是一个已报告的错误 - 您可以在这里投票:https://youtrack.jetbrains.com/issue/PY-16132

关于python - Pycharm 警告 : must implement all abstract methods,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34066933/

相关文章:

python - Pascal DLL 没有函数

python - 添加 (row, col) 作为元素级 numpy 函数的参数?

python - 用python编写AES-CTR解密例程

c# - 是否有可能在 Visual Basic 中收到 "use of uninitialized local variable"警告?

c - 赋值使指针无需强制转换

python - GridsearchCV 异常

html - <h1>没有从其容器继承font-weight

javascript - 从 setTimeout() 内部调用 this._super()

java继承方法

haskell - 在使用类型系列限制 GADT 时摆脱 "non-exhaustive patten matches"警告