Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 31)
31.
In Python, what is the purpose of the __call__() method in a class?
To call a method of the superclass
To create a new instance of the class
To make an instance of the class callable
To access class attributes directly
Answer: Option
Explanation:
The __call__() method is called when an instance of a class is used as a function, allowing instances to be callable.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.