[ZODB-Dev] Disappearing volatile attributes in ZODB 3.6

Dieter Maurer dieter at handshake.de
Sun Jan 14 11:39:57 EST 2007


Terry Jones wrote at 2007-1-12 20:58 +0100:
>....
>I have a top-level class (call it ABC) that I only ever want one instance
>of. In __init__ of that class, it uses a couple of _v_ attributes to open a
>ZODB store and get the root dictionary. If the root is empty it puts a few
>things into it. It then uses setattr to set some attributes of self to
>the things in the ZODB root. Then it just acts like any other Python class.
>
>Is that normal?

It sounds a bit strange:

  When the "class" (more precisely, its singleton instance)
  opens a ZODB store (assuming it is the only one), then
  this instance is apparently not persistent (from what
  "ZODB store" should it come). But when it is not persistent,
  "_v_" attributes are just normal attributes.




-- 
Dieter


More information about the ZODB-Dev mailing list