python 递归调用默认上限:1000次
1、比较运算符: __cmp__(self,other)比较 __eq__(self,other)相等
__lt__(self,other)小于 __gt__(self,other)大于
2、逻辑运算符: __or__(self,other) __and__(self,other)
3、数学运算符: __add__(self,other) + __sub__(self,other) -
__mul__(self,other) * __div__(self,other) /
4、转换为字符串: __str__ __repr__ __unicode__
5、展现对象属性: __dir__
6、设置对象属性:
__setattr__(self,name,value)
7、查询对象属性: __getattr__(self,name)
__getattribute__(self,name)
8、删除对象属性: __delattr__(self,name)