[ZODB-Dev] [Problem] "_v_" variables too volatile

Dieter Maurer dieter at handshake.de
Wed Dec 10 15:11:35 EST 2003


Casey Duncan wrote at 2003-12-10 14:01 -0500:
> ...
>> I agree there are points in the lifetime of an object that uses _v_ attributes 
>> where it can state that it no longer assuming that its _v_ attributes will 
>> disappear arbitrarily. In Dieters original proposal, we need to support 
>> self._p_keepv=0 . For safety, Im sure we need for any _v_ assignment to 
>> automatically turn it on.
>
>Unfortuately that adds a check to every setattr, which kinda sucks.

We have it anyway:

  "__setattr__" must (usually) set "_p_changed" (unless it is already set
  or the attribute is volatile).
  It must not set it for "_v_" attributes.

  Thus, the special code for "_v_" attributes is already there.
  We just need to change it a bit (setting "_p_has_volatile").

-- 
Dieter



More information about the ZODB-Dev mailing list