Dec-11-2020, 10:19 PM
(Dec-10-2020, 10:32 PM)buran Wrote: built-in setattr()Hi buran
Quote:This is the counterpart ofgetattr()
. 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, 'foobar', 123) is equivalent to x.foobar = 123.
setattr(w, 'toto', val)
Thanks a lot
Arbiel