Python Programming - Classes - Discussion

Discussion Forum : Classes - General Questions (Q.No. 13)
13.
What is the purpose of the @abstractmethod decorator?
It creates an abstract class in Python.
It indicates a method that must be implemented by any concrete (non-abstract) subclass.
It is used to define a method that cannot be overridden.
It marks a method as private and inaccessible from outside the class.
Answer: Option
Explanation:
The @abstractmethod decorator is used to define abstract methods in an abstract class. Any concrete subclass must implement these abstract methods.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.