转自: https://www.cnblogs.com/blackmatrix/p/5681480.html
__getattr__: 类或实例在未定义的属性,才会调用 __getattr__方法
__getattribute__:类或实例的每个属性访问都有效
类中有__getattribute__方法时 在方法中调用 ‘.’ 操作,可能会出发递归调用,谨慎使用,可用超类解决此类问题
super().__getattribute__(self, item)
转自: https://www.cnblogs.com/blackmatrix/p/5681480.html
__getattr__: 类或实例在未定义的属性,才会调用 __getattr__方法
__getattribute__:类或实例的每个属性访问都有效
类中有__getattribute__方法时 在方法中调用 ‘.’ 操作,可能会出发递归调用,谨慎使用,可用超类解决此类问题
super().__getattribute__(self, item)
转载于:https://www.cnblogs.com/JAYWX/articles/10396668.html