私はある種のライブラリに取り組んでいますが、奇妙な理由でこのエラーが発生しました。
コピペしかできなくてごめんなさい
以下のコードが機能することに基づいて行きました
test.py
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class Base(object):
@abc.abstractmethod
def whatever(self,):
raise NotImplementedError
class SubClass(Base):
def __init__(self,):
super(Base, self).__init__()
self.whatever()
def whatever(self,):
print("whatever")
Python シェルで
>>> from test import *
>>> s = SubClass()
whatever
名簿モジュールでこのエラーが発生する理由
Can't instantiate abstract class Player with abstract methods _Base__json_builder, _Base__xml_builder
前もって感謝します