__getattribute__() method is designed to handle lower-level attributes.
The default implementation tries to find the name in the internal __dict__ (or __slots__ ). If the attribute is not found, it calls __getattr__() .
UPDATE (as in the comment):
These are different ways of finding attributes in a Python data model. They are internal methods designed to be replaced correctly in any possible situation. Hint: "The mechanism is in object.__getattribute__() , which converts bx to type(b).__dict__['x'].__get__(b, type(b)) ." from docs.python.org/3/howto/descriptor.html
source share