setattr() 函数对应函数getattr(),用于设置属性值,该属性必须存在。python
setattr()的使用:函数
上一篇博文中也有用到setattr()(python中的可变参数).net