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.

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to