Python - Polymorphism and Dynamic Behavior
Which of the following is the correct way to declare an abstract method in a Python abstract base class?
@abstractmethod from the abc module.@abstractmethod decorator correctly. 'def method(self): pass' misses the decorator, '@abstract\ndef method(self): pass' uses a wrong decorator name, and 'def abstract method(self): pass' uses invalid syntax.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions