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__()) > Alternatively, you can assure that field is acticated first, using > _p_activate or by accessing an > attribute. Regards, Marius Gedminas -- Those of you thinking that grown men with serious jobs should be above such phrases as "way friendlier" should realise that in the 21st century, adult appropriation of infantilisms is de rigueur, innit? -- Stuart Jeffries
signature.asc
Description: Digital signature
_______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@zope.org https://mail.zope.org/mailman/listinfo/zodb-dev