Dec-10-2020, 10:06 PM
Hi everybody
Window being a class, I define an Window objet's argument whose name is stored in a variable with the following code :
Is there a smarter way to proceed ?
Arbiel
Window being a class, I define an Window objet's argument whose name is stored in a variable with the following code :
w=Window() arg='toto' val='any value' exec('w.'+arg+'=val') w.toto 'any value'Generally speacking, using «exec» is not a very good practice.
Is there a smarter way to proceed ?
Arbiel