[ZODB-Dev] Lazy Instantiation
Leonardo Santagada
santagada at gmail.com
Sun Jan 23 19:43:03 EST 2011
On Sat, Jan 22, 2011 at 3:23 PM, Jim Fulton <jim at zope.com> wrote:
> a.child == None
>
> will because equality comparison will attempt to access
> methods on the child, which will cause it's activation.
>
Why would it unghost the object? If it is already instantiated it
already has all the magic methods that it needs for == , I was in the
impression that the dictionary would only be loaded if any of the
magic methods tried to access a property on the object. Is this to
support overriding methods on objects after instantiation (like
manually messing around with an objects __dict__)?
I tried to read the source of ZODB (to think in what way could it be
ported to pypy) but I didn't get very far.
--
Leonardo Santagada
More information about the ZODB-Dev
mailing list