How to force subclasses to implement a field using abstract base class in Python?

前端 未结 0 1396
醉话见心
醉话见心 2021-02-11 06:53

Abstract base class can force implementation of a method by all it\'s child classes using @abstractmethod decorator. Can the same be done with class fields?

相关标签:
回答
  • 消灭零回复
提交回复
热议问题