Peter Bengtsson wrote:
On 2/16/06, Jeff Shell <[EMAIL PROTECTED]> wrote:
One could, but it's really not worth it. It's just the laws of Python
and mutability and immutability :). (It took me years to understand
those terms. I kept associating them with 'mutable' in the "can be
made quiet" se
> > - Shaun
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > > On Behalf Of Stephan Richter
> > > Sent: Wednesday, February 15, 2006 8:43 AM
> > > To: zope3-users@zope.org
> > >
Peter Bengtsson wrote:
So by using PersistentList it just means that you can use:
self.alist.append(1)
in your code. The attribute, self.alist, is still saved even without
PersistentList but it just means you have to be careful when writing
to it.
PersistentX classes also usually subclass Pers
nds like too much work, and would be problem prone even so. After
> all, some things you don't want to be persistent!
>
> - Shaun
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> > On Behalf Of Stephan Richter
&
OTECTED]
> On Behalf Of Stephan Richter
> Sent: Wednesday, February 15, 2006 8:43 AM
> To: zope3-users@zope.org
> Cc: Florian Lindner
> Subject: Re: [Zope3-Users] What attributes are made persistent
>
> On Wednesday 15 February 2006 08:21, Peter Bengtsson wrote:
> > class
On 2/15/06, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> D'oh! That's confusing. Isn't there a class that gathers all of these in one.
All of who?
> It seems confusing, you derive from Persistent but only some are accepted.
> Does that mean that there's PersistentFloat and PersistentTuple too?
B
On 2/15/06, Paul Winkler <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 15, 2006 at 01:21:14PM +, Peter Bengtsson wrote:
> > I understand the mutation stuff and I always do it like this in zope2
> > (I'm a complete beginner in the zope3 world eager to learn):
> >
> > def updatesometing(self):
> >
On Wed, Feb 15, 2006 at 01:21:14PM +, Peter Bengtsson wrote:
> I understand the mutation stuff and I always do it like this in zope2
> (I'm a complete beginner in the zope3 world eager to learn):
>
> def updatesometing(self):
>#self.numbers['Peter'] = "0779 123 456"
>numbers = self.num
On Wednesday 15 February 2006 08:21, Peter Bengtsson wrote:
> class PersistentAnything(PersistentMapping, PersistentList,
> PersistentDict):
AA! This is so wrong! It merges two incompatible APIs: collections and
mappings. The non-persistent equivalent to this is:
>>> class DoEverything(set
-- Forwarded message --
From: Peter Bengtsson <[EMAIL PROTECTED]>
To: Jeff Shell <[EMAIL PROTECTED]>
Date: Wed, 15 Feb 2006 13:14:58 +
Subject: Re: [Zope3-Users] What attributes are made persistent
On 2/15/06, Jeff Shell <[EMAIL PROTECTED]> wrote:
> On 2/1
Peter Bengtsson wrote:
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.
Urm, Peter, the rules of persistence w.r.t. mutable objects
Oh! And reference to related Persistence modules (persistent mappings,
lists, BTrees):
http://www.zope.org/Wikis/ZODB/FrontPage/guide/node6.html
On 2/14/06, Jeff Shell <[EMAIL PROTECTED]> wrote:
> On 2/14/06, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> > D'oh! That's confusing. Isn't there a cla
On 2/14/06, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> 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
Peter Bengtsson wrote:
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 c
On 2/14/06, Lennart Regebro <[EMAIL PROTECTED]> wrote:
> On 2/14/06, Florian Lindner <[EMAIL PROTECTED]> 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):
> >
On 2/14/06, Florian Lindner <[EMAIL PROTECTED]> 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 Zo
On Feb 14, 2006, at 4:52 PM, Florian Lindner 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.
Mu
Hello,
in a class derived from Persistent, which attributes are stored? All or only
those thar are declared in the interface?
def __init__(self):
self.queue = {}
self.queue seem is empty each time I restart Zope.
Thanks,
Florian
___
Zope
18 matches
Mail list logo