I am trying to assign a value to the attributes of some calss for example:
for name in dir(modelType): if request.get(name): getattr(model, name) = request.get(name)
but we get an exception: "cannot assign a function call"
How can I change attributes without knowing them at the appropriate time?
python getattr
Alon gutman
source share