This function is similar to Section 14.8, “getattr(): Retrieve an attribute of a
given name”: it sets the value of some attribute whose name is from an instance A to a new value I:
V
setattr(I,A,V)
Example:
>>> class C5: ... def __init__(self, x): ... self.x = x ... >>> c=C5(14) >>> c.x 14 >>> setattr(c, 'x', 19) >>> c.x 19