详解Python的hasattr() getattr() setattr() 函数使用方法 hasattr(object,name)判断一个对象里面是否有name属性或者name方法,返回BOOL值,有name特性返回Tru setattr函数