[ZODB-Dev] Persistent object has empty __dict__ for a little while

Jim Fulton jim at zope.com
Thu Jan 7 09:41:53 EST 2010


On Thu, Jan 7, 2010 at 7:04 AM, Marius Gedminas <marius at gedmin.as> wrote:
> On Wed, Jan 06, 2010 at 06:37:31PM -0500, Jim Fulton wrote:
>> __dict__ is a special variable. Accessing it doesn't cause an object
>> to be activated.
>>
>> Rather than doing:
>>
>>    clone.__dict__.update(field.__dict__)
>>
>> I would do:
>>
>>    clone.__setstate__(field.__getstate__)
>
> Nitpick:
>
>     clone.__setstate__(field.__getstate__())

Yup. Thanks.

Jim

-- 
Jim Fulton


More information about the ZODB-Dev mailing list