1. 首页
  2. 考试认证
  3. Linux/Unix认证
  4. Python使用内置函数setattr设置对象的属性值

Python使用内置函数setattr设置对象的属性值

上传者: 2020-12-17 13:50:30上传 PDF文件 29KB 热度 24次
英文文档: setattr(object, name, value) This is the counterpart of getattr(). The arguments are an object, a string and an arbitrary value. The string may name an existing attribute or a new attribute. The function assigns the value to the attribute, provided the object allows it. For example, setattr(x,
下载地址
用户评论