import abc
class Car(metaclass=abc.ABCMeta):
def __init__(self,model=None):
self.model = model
@abc.abstractmethod
def run(self):
pass
class ToyotaCar(Car):
def __init__(self, model,enable_auto_run=False):
super().__init__(model)
self.enable_auto_run = enable_auto_run
#If you do not override it with the inherited class, an error will occur when you create the object
def run(self):
print('fast fun')
toyota_car = ToyotaCar('Lexus')