Re: Re: extending PersistentList

Christopher Lozinski <[email protected]>
Newsgroups gmane.comp.web.zope.zodb
Message-ID <[email protected]>
At first it all looked too easy.

PersistentList stores the objects in itself, and is complex. It is
indeed easier to create PersistentList2 by pointing to a List object and
updating _p_changed. So I will assume that you are storing your objects
in the attached list, and not in the PersistentList2 itself.

But then you do not need to subclass off of MutableSequence. Worse yet,
if you do subclass off of
MutableSequence, but only implement some of the methods, for example no
slice methods, if you ever use the slice method, it will execute on the
object itself, and not on the linked to list.

Here are some other comments.

It was a great idea to separate out your application code ServerField
List from PersistentList2. 

Makes it much easier for us to understand what you are doing, and the
relevance to everyone else.

You did not say what is wrong with Persistent List.  What is it that you
are trying to add.  Maybe someone else

has already done it?

What is that self.owner.__dirty__ = True all about?
Hope that helps.
Chris

-- 
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.