class A:
X = 10
def __getattribute__(self, item):
print("__getattribute__ is called")
def __getattr__(self, item):
print("__getattr__ is called")
a = A()
a.Y
Options:
Explanation
Correct answer is : A
All the attribute fetch invokes __getattribute__() method.
But when __getattribute__() and __getattr__() both available, only __getattribute__() will be invoked
Comment here: