[Zope] Best Class for Persistent, Ordered List

Chris McDonough chrism@zope.com
Mon, 29 Jul 2002 08:48:16 -0400


> At 03:30 PM 7/28/02 -0400, Chris McDonough wrote:
> >Wait a second, I just reread Ross' original question.  He *doesn't*
> >want the items to be sorted.  I misunderstood, sorry!
> >
> >There's nothing wrong with PersistentList or just a plain old
Python
> >list for this purpose.  Order of insertion is preserved in either.
>
> I'm glad someone was paying attention!  Thanks, Florent.

What did you say? ;-)

>
> Is PersistentList available anywhere in the Zope core?  As far as I
could
> tell, it's not, so I've stuck my own file in with it.

No, it doesn't come in the Zope core.

> Also, I thought perhaps there might be some performance or
concurrency
> issues with vanilla (Persistent or not) lists.

No.  ZODB handles the concurrency issues.  If you change the same
object in more than one thread at the same time, a conflict error is
raised and Zope tries again.

> P.S. Just out of curiosity, how are the OOSet elements ordered?  via
__cmp__?

I'm not sure, but that would make sense.

- C