@(Python)
a = A()
a.x
A.x
a.x -> a.__getattribute__
it will take over and run default access order, so if overriding this method, access order would change
- if x is a data descriptor, call type(a)._dict_[’x’]._get_(a, type(a))
- if 'x' in a._dict_, get a._dict_['x']
- if 'x' in A._dict_ or x is a non-data descriptor, exclusive, get A._dict_['x'] or x._get_
- if _getattr_ is defined, it comes as a backup
- raise AttributeError
A.x -> A.__getattribute__
- x is a descriptor, call A._dict_[’x’]._get_(None, A)
- 'x' in A._dict_, get A._dict_['x']
- raise AttributeError(no _getattr_ as back up)