force implementing specific attributes in subclass python
问题 I'm have a parent class, and I would like to "force" everyone that will inherit from it to implement some specific class attributes. I don't have this problem with methods, since I have created a dummy method that raises NotImplementedError , which makes it very clear. As for class attributes- I do not want to create them in the parent class and set them to None since that doesn't force the developer to implement them in the child class. A little code to demonstrate the current situation: