Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 53)
53.
How can you achieve method overriding in Python using the @abstractmethod decorator?
By directly using the @abstractmethod decorator on the overridden method
By using the @override decorator
By using the @implements decorator
Method overriding is not possible using @abstractmethod
Answer: Option
Explanation:
Method overriding in Python can be achieved by using the @abstractmethod decorator on the method in the superclass and implementing it in the subclass.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.