[Zope3-Users] What attributes are made persistent

Peter Bengtsson mail at peterbe.com
Tue Feb 14 18:45:26 EST 2006


On 2/14/06, Lennart Regebro <regebro at gmail.com> wrote:
> On 2/14/06, Florian Lindner <mailinglists at xgm.de> wrote:
> > Hello,
> > in a class derived from Persistent, which attributes are stored? All or only
> > those thar are declared in the interface?
>
> All.
>
> >     def __init__(self):
> >         self.queue = {}
> >
> >
> > self.queue seem is empty each time I restart Zope.
>
> That's because dictionaries are not derived from Persistent. Try PersistentDict.
>
D'oh! That's confusing. Isn't there a class that gathers all of these in one.

It seems confusing, you derive from Persistent but only some are accepted.
Does that mean that there's PersistentFloat and PersistentTuple too?
If not, why *only* dicts?

> --
> Lennart Regebro, Nuxeo     http://www.nuxeo.com/
> CPS Content Management     http://www.cps-project.org/
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
>


--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Zope3-users mailing list