Alec Munro wrote:
class SomeObj:
    some_dictionary = PersistentDict({})

ouch, never use mutables for class attributes, for exactly the reasons you've found.

two points:

1. the dict will get newly created every time this code runs, ie: each time Zope starts.

2. the object is never "seated" into the ZODB. It's an attribute of the class, not any instance of the class, and it's only instances of the class that are persisted by zodb.



Simplistix - Content Management, Zope & Python Consulting
Zope3-users mailing list

Reply via email to