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

Uche Ogbuji uogbuji@fourthought.com
Sun, 25 Jun 2000 09:53:53 -0600


> Traditionally, Python attributes (including methods) with 
> names starting with '_' were treated as private.

This is an informal tradition, not universal, and hardly normative.

> Why oh why then does the Python DOM implementation use 
> method names beginning with '_'s in the public API (for
> getting attributes), as in '_get_nodeType'? Why not 
> 'get_nodeType' or 'getNodeType'? Is the intent that these
> functions shouldn't be called by Python code?

We have it this way in order to follow the Python/CORBA mapping.

> Is there are description somewhere of the Python DOM mapping, 
> other than the DOM sources?

Just the xml-sig mailing list archives, I'm afraid.  We should indeed work on 
this.

-- 
Uche Ogbuji                               Principal Consultant
uche.ogbuji@fourthought.com               +01 303 583 9900 x 101
Fourthought, Inc.                         http://Fourthought.com 
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python