Re: dynamicly updating an objects fields
- From: Robert Kern <rkern@xxxxxxxx>
- Date: Wed, 31 Aug 2005 07:16:03 -0700
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
.
- References:
- dynamicly updating an objects fields
- From: kyle.tk
- Re: dynamicly updating an objects fields
- From: Uwe Lauth
- dynamicly updating an objects fields
- Prev by Date: Re: What are new-style classes?
- Next by Date: Re: Bug in string.find; was: Re: Proposed PEP: New style indexing,was Re: Bug in slice type
- Previous by thread: Re: dynamicly updating an objects fields
- Next by thread: Python doc problems example: gzip module
- Index(es):
Relevant Pages
|
|