以下に示すように、Python 3 を使用して抽象クラスを作成しようとしています。
from abc import *
class Base(metaclass=ABCMeta):
@abstractmethod
def __init__(self, text=''):
self._text = text
@property
@abstractmethod
def text(self):
return self._text
@text.setter
@abstractmethod
def text(self, text):
self._text = text
class SubClass(Base):
def __init__(self, text):
super().__init__(text)
@property
def text(self):
return super().text
q = SubClass("Test")
ファイルを実行すると、インタープリターは text.setter が実装されていないと不平を言いません。エラーが出ないのはなぜですか?