getattr function syntax format: GetAttr (object, name[, default) parameter is an object, object property value, object property does not exist the corresponding default value name must be a string. If name is the property of an object, the value of that name is returned. For example, GetAttr (x, ' Foobar ') is equivalent to X.foobar. If name does not exist, and there is a default argument, default is returned; otherwise the attributeerror is thrown.
setattr function syntax format: SetAttr (object, name, value) GetAttr () the opposite operation. Parameters are an object, a string, and any value. Name can be a property that exists for an object, or you can add a new property name to an object. This function assigns a value to the Name property, as long as the object is allowed. For example, SetAttr (x, ' Foobar ', 123) is equivalent to X.foobar = 123.
The hasattr function syntax format: The Hasattr (object, name) argument is an objects and a string, respectively. Returns TRUE if name is the property of the object, otherwise false. (implemented by calling GetAttr (object, name) to see if it throws an exception).
delattr function syntax format: The Delattr (object, name) argument is an object and a string this function and SetAttr () about name must be an object's property. This function deletes the Name property as long as the object allows it. For example, delattr (x, ' Foobar ') is equivalent to Del X.foobar.
Reference Document: Http://python.usyiyi.cn/translate/python_278/library/functions.html