Re: Replacing Axiom Lists with a new list of Items

Robert Gravina <[email protected]> Sun, 2 Jul 2006 04:25:11 +0900
Newsgroups gmane.comp.python.quotient.dev
Message-ID <[email protected]>
> On Sun, 2 Jul 2006 03:12:30 +0900, Robert Gravina  
> <[email protected]> wrote:
>> In Axiom, is there any quick way to update the contents of one  
>> List  with the contents of another, so that existing items can be  
>> updated,  non existing ones deleted, and new ones added?
>
> In general, it is probably best to avoid axiom.sequence.List.  It was
> written as part of an axiom tutorial and it demonstrates various APIs
> pretty well, but it doesn't actually perform very well and it usually
> does more work than you actually need.

How else can I give Item objects collections of other Items then? In  
all the examples I've seen, Lists were used.

> That said, there is no simple efficient way to perform the operation
> you describe on any other kind of set or sequence in Axiom.

There are other kinds?! Great! But axiom/sequence.py only defines one  
class, List. Where are the others?

> Iterating
> over the elements of the set is the only way to do it.  Ultimately
> there may be a better spelling for this, but it's not there yet.
>

I understand. Axiom is great considering it's less than a year old. I  
was using ZODB, and although I like that there is very little work in  
updating objects with lots of children objects, things got hairy when  
using Twisted PB and I didn't want to start again with ZEO and Zope.

Robert

> Jean-Paul
>
> _______________________________________________
> Divmod-dev mailing list
> [email protected]
> http://divmod.org/users/mailman.twistd/listinfo/divmod-dev