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

2010-01-07 Thread Jim Fulton
On Thu, Jan 7, 2010 at 7:04 AM, Marius Gedminas 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:

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

2010-01-07 Thread Marius Gedminas
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:

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

2010-01-06 Thread Jim Fulton
On Wed, Jan 6, 2010 at 10:40 AM, Martin Aspeli wrote: > Hi, > > This one is pretty high no the list of weirdest things to have happened > to me in a while. Basically, I have a persistent object that has an > empty __dict__() on the first request, until it suddenly decides to have > data again. > >

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

2010-01-06 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Aspeli wrote: > Hi, > > This one is pretty high no the list of weirdest things to have happened > to me in a while. Basically, I have a persistent object that has an > empty __dict__() on the first request, until it suddenly decides to have

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

2010-01-06 Thread Laurence Rowe
2010/1/6 Martin Aspeli : > Hi, > > This one is pretty high no the list of weirdest things to have happened > to me in a while. Basically, I have a persistent object that has an > empty __dict__() on the first request, until it suddenly decides to have > data again. > > I'm on ZODB 3.9.3, using Zope