[XML-SIG] Ugh! Why are DOM access methods spelled with a leading
Tue, 27 Jun 2000 19:06:24 -0400
Paul Prescod wrote:
> Jim Fulton wrote:
> > ...
> > If you store the parent in the child, then you are causing a circular reference
> > which is very likely to cause a leak. An API that requires implementation of
> > __getattr__ to avoid storing the parent encourages storing the parent.
> An API that has a getParent() method also encourages storing the parent.
> The DOM is the source ofthe problem.
I don't agree. It fact, it certainly suggests that some computation is
possible. If I want to compute the parent, I can do so without mucking
with __getattr__. OTOH, if I have to support "foo.parent" (as I
apparently do) then the only way to avoid implementing __getattr__
is to store the darn thing.
> You can implement a DOM subset that only supports the method versions.
Noooooooooo. If I'm going to bother to implement DOM, I want it
to work with all DOM clients.
> We can easily whip up adapter proxies that make your DOMs compliant with
> the full attributes+methods API if interoperability becomes an issue. If
> you get hundreds of Python objects to support your DOM interface then we
> may think twice about being partially incompatible with them and migrate
> our users to the method version.
Whimper. I don't want *my* DOM API. I want there to be exactly *one*
official documented Python DOM API mapping. I'd prefer that the mapping
be as easy as possible to implement and use and, as a bonus, it would be
swell if it worked well with Zope, which the current API doesn't. Oh
Jim Fulton mailto:email@example.com Python Powered!
Technical Director (888) 344-4332 http://www.python.org
Digital Creations http://www.digicool.com http://www.zope.org
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for