[Zope3-dev] Re: proposed changes to contained helper functions

Fred L. Drake, Jr. fred at zope.com
Thu Oct 2 15:56:39 EDT 2003


Garrett Smith writes:
 > It seems your application is a bit different from a typical __setitem__ 
 > scenario, where the child is named.

That depends on whether you're thinking of sequence __setitem__ or
mapping __setitem__.  ;-(  The DOM is mostly about sequences of
children; the children have indexes, but not names.  The indexes are
not specific to the node being referenced, but change as nodes are
added and removed before the child in the parent.  (Think of an
element node as a list of children.)

The container ideas are really founded on the mapping interface, so I
suspect the DOM should avoid __name__, and only implement __parent__
as a read-only property that returns self.parentNode.


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation



More information about the Zope3-dev mailing list