[XML-SIG] The '_' thingy

Jim Fulton jim@digicool.com
Mon, 26 Jun 2000 18:40:31 -0400

Mike Olson wrote:
> So, I think I see this as a general concensius:

Are you kidding?

> 1.  DOM will never (in forseeable future) be used over an ORB, so the
> IDL should be used as a guide. 

Uh, this doesn't make sense.

> We should focus more on useability then
> CORBA compliance.
> 2.  Most people will access the DOM via attributes.

Who says? What do you have to support this? Most people
will access the DOM through whatever interface we define.
> 3.  We need a DOM language mapping document.

Yes, we have consensus on this. :)

> 4.  Computed attribute callback function names should be left up to the
> implementator (or do we want to define this).  If we do define this,
> then they should be private, and start with an '_' or two.

If accessor functions are part of the API, then they should not
begin with '_'.
> If all are good with this,

I'm not. I would prefer to see accessor functions for
DOM attributes that are a part of the API and whos names 
don't begin with '_'s.

> then we should start down this path. 

Whatever path we start down, it should begin with a draft
that documements the DOM mapping for Python.

> A
> langauge mapping is something we can put into the next release of 4DOM
> (something we've been meaning to do any ways).  The rest of the cahnges
> are actually in place (unless we define a different callback naming
> convention).  We will be slowly depricating _get_* soon as well.
> However we will still need __setattr__ callbacks in some cases....

Not if you go to accessor functions instead of attribute-based access.

In summary, I think using attribute-based access for the Python DOM
API would be a mistake because it will make efficient DOM implementations
harder than necessary to create. I'd prefer to see accessor functions used
to provide access to DOM attributes.

There has, however, been relatively lettle discussion on this.
I'm curious what opinions others have.


Jim Fulton           mailto:jim@digicool.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