Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 26)
26.
What is the purpose of the __getattr__() method?
To define class attributes
To create a new instance of the class
To customize attribute access for undefined attributes
To access superclass attributes directly
Answer: Option
Explanation:
The __getattr__() method is called when attempting to access an undefined attribute, allowing customization of attribute access.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.