[ZODB-Dev] know the state of an object
Tim Peters
tim.one at comcast.net
Thu Oct 20 11:42:30 EDT 2005
[Victor Safronovich]
>>> invalidate
[Dieter Maurer]
>> I think, this is not easily available, but
>> "obj._p_changed = None" might work
[Victor]
> What about obj._p_invalidate()?
I don't think _p_invalidate() existed before ZODB 3.3.
At and after 3.3,
obj._p_invalidate()
is the same as
del obj._p_changed
and
obj._p_deactivate()
is the same as
obj._p_changed = None
I wish the latter spellings could go away.
Ah, fudge. The docs (persistent/interfaces.py) claim that _p_invalidate()
is the same as del'ing _p_changed, but it's not clear that that's always
true (the implementation of _p_invalidate does more than the implementation
of del'ing _p_changed) . I'm not sure what the intent was.
More information about the ZODB-Dev
mailing list