[XML-SIG] Ugh! Why are DOM access methods spelled with a leading
Tue, 27 Jun 2000 11:13:45 -0400
Uche Ogbuji wrote:
> Tom Passim:
> > Jim Fulton continued the attributes thread -
> > I still don't see why anyone is still arguing about whether the DOM rec
> > makes Python use attributes. I doesn't. In fact, it says that what are
> > called "attributes" in the IDL definitions are NOT supposed to be attributes
> > in implementations, and that the get/set accessor functions don't have to
> > store/retrieve from actual objects, let alone attributes of objects.
> > So can we at least lay this part of it to rest? Now if most people think it
> > is more 'Pythonic' to use attributes, or if there are clearcut performance
> > benefits, then we have a basis for discussion. But let's quit talking about
> > whether the DOM rec makes us do attributes.
> Now I have no idea what you lot are arguing. The first argument was against
> leading underscore because it's "not Python idiom". The point was made that
> we should simply cock a snook at the Python/CORBA binding. Once that point
> was allowed, the same lot are arguing against using attributes, which are
> indisputable Python idiom on the grounds that it goes against the spirit of
> the W3C spec.
People who read the W3C spec have reason to expect accessor functions.
This is a resonable argument for them. While this argument isn't necessarily
conclusive, there's no reason to dismiss it.
I think a much stronger argument is that requireing that DOM attributes
be published as Python attributes puts an undue burden on DOM implementors.
The abstraction of attribute access to allow computation *is* a Python
idiom, but so is use of accessor functions. Avoidance of circular references
is *certainly* a common Python design practice. There are techniques for
implementing the DOM API that avoid circular references that require
compting some DOM attributes. Requiring that DOM attributes be published
as Python attributes makes this harder.
> I hope I can be blunt without antagonism, but it seems as if a particular goal
> is in mind: i.e. DOM attribute access through accessor/mutators only, and any
> available argument is being thrown at that goal.
Is there something wrong with presenting arguments to support a position?
> I'll note that I claim to have no agenda
But you have an opinion, which is fine.
> except to do what's sensible for
> Python and DOM (we've already put a great deal of work into making 4DOM
> conform to the earlier list consensus, and we could put in more work if it
> made sense.)
I question the value of list consensus without follow through. I, as a DOM
implementor have no way of knowing what the list consensus was unless I
happened to be paying attention at the time, which I wasn't. If there was
consensus, then it should be published.
When I asked about the API a few days ago, there didn't seem to me
to be much consensus about what the Python DOM API actually is.
Jim Fulton mailto:firstname.lastname@example.org 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