Re: dynamicly updating an objects fields



Uwe Lauth wrote:
> kyle.tk wrote:
>
>>I want to make a function that will work like this:
>>
>>def updateField(object, fieldName, newValue):
>> object.fieldName = newValue
>
> This function already exists in python.
> It is called settattr.

Or rather setattr.

--
Robert Kern
rkern@xxxxxxxx

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter

.



Relevant Pages