Alec Munro wrote:
Well, I narrowed it down a little bit more.
I've been initializing the dictionary in the class declaration, like
the following:
class SomeObj:
some_dictionary = PersistentDict({})
Now, for some reason, each time Zope was started, it called this, and
whenever I tried to
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
Woohoo!
This is precisely the advice I needed.
I think where I got tripped up is that I rarely use class attributes
outside of Zope (setting everything up in __init__), so I actually
stopped treating them as class attributes, and pretended they were
simply part of the initilization.
I think I'm
Well, I narrowed it down a little bit more.
I've been initializing the dictionary in the class declaration, like
the following:
class SomeObj:
some_dictionary = PersistentDict({})
Now, for some reason, each time Zope was started, it called this, and
whenever I tried to access the