Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 52)
52.
In Python, what is the purpose of the __call__() method in a metaclass?
To create a new instance of the metaclass
To define class attributes for the metaclass
To customize the behavior when an instance of the metaclass is called
To access superclass attributes directly
Answer: Option
Explanation:
The __call__() method in a metaclass is used to customize the behavior when an instance of the metaclass is called, allowing customization of class creation.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.