[XML-SIG] Ugh! Why are DOM access methods spelled with a leading '_'?

Paul Prescod paul@prescod.net
Fri, 23 Jun 2000 15:17:48 -0700

"Fred L. Drake, Jr." wrote:
> ...
>  > Is there are description somewhere of the Python DOM mapping,
>  > other than the DOM sources?
>   The W3C documentation gives the IDL mapping, which requires the
> Python specific mapping.

Actually, the DOM can be mapped into a language in a manner that does
not follow directly from the IDL and CORBA specs. That's why there is a
formally defined java binding rather than just a reference to the IDL
specs. Historically, though, 4DOM was really a CORBA tool so it really
needed to follow the specs.

I would vote for losing the leading underscore. 

> This says to me that the DOM API specifies use of methods
> for interface attributes. 

I think it is safe to say that a binding should not require a particular
underlying data structure but Python allows the use of a.b syntax even
when the surface structure is wildly different than the underlying data
structure. I'm preaching to the choir as you are the world leader in
abuse of the dot notation. :)

Visual Basic and ECMAScript (the latter is actually specified) also use
dot notation for what could conceptually be a method invocation.

 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Out of timber so crooked as that which man is made nothing entirely
straight can be built. - Immanuel Kant