Re: [Zope-dev] persistence and lists

2002-09-18 Thread Casey Duncan
Sounds like you are trying to persist a class attribute value. This is not possible because instance are persistent, not classes. This is also the reason that the values change over all the instances. You are changing a mutable attribute of the class in place. I would suggest setting the

Re: [Zope-dev] persistence and lists

2002-09-18 Thread Lennart Regebro
From: Arndt Droullier [EMAIL PROTECTED] How can I save the list/dictionaries after changes? The easiest thing to do is to is to use PersistentMapping and PersistentList. Create them in __init__ with self.dictionary = PersistentMapping() instead of setting them as a class attribute.

Re: [Zope-dev] persistence

2001-06-28 Thread Michel Pelletier
On Thu, 28 Jun 2001, Mark McEahern wrote: I'm a Zope and Python newbie and I'm trying to utilize Persistence, but I've seen two different ways: import ZODB from Persistence import Persistent vs. from Globals import Persistent Are these different? If so, which is

RE: [Zope-dev] Persistence ( was Thread Safe Counting )

2001-02-12 Thread Tres Seaver
Jon Franz [EMAIL PROTECTED] wrote Ah! this makes more sense, the idea of persistent properties even fits with this idea, though a true write-in-place property might be even better for some applications ;) Two things: * Don't count on storing the hit counter as a separate, "persistence

Re: [Zope-dev] Persistence ( was Thread Safe Counting )

2001-02-11 Thread Chris Withers
Jon Franz wrote: So subclassing persistent will avoid changes to the object being stored and roll-backable in the ZODB? NO! read the posting again... Subclassing from persistent is HOW you make things live in the ZODB. However, objects that subclass Persistent get their own pickle jar, and

RE: [Zope-dev] Persistence ( was Thread Safe Counting )

2001-02-11 Thread Jon Franz
:[EMAIL PROTECTED]] Sent: Sunday, February 11, 2001 1:05 PM To: Jon Franz Cc: '[EMAIL PROTECTED]' Subject: Re: [Zope-dev] Persistence ( was Thread Safe Counting ) Jon Franz wrote: So subclassing persistent will avoid changes to the object being stored and roll-backable in the ZODB