In the design of the abstract base class, I can find the following scenarios. What are the design considerations of adding @property for a method in the abstract base class. When I implement the related function, e.g., f1
here, are there any differences comparing to implementing f1
, which does not have @property
decorator?
@abstractmethod
def f(self)
pass
@property
@abstractmethod
def f1(self)
pass