[XML-SIG] The '_' thingy

Dieter Maurer dieter@handshake.de
Tue, 27 Jun 2000 21:05:22 +0200 (CEST)

Mike Olson writes:
 > So, I think I see this as a general concensius:
I am not consent.

 > 1.  DOM will never (in forseeable future) be used over an ORB, so the
 > IDL should be used as a guide.  We should focus more on useability then
 > CORBA compliance.
I would like very much that database suppliers (Oracle, Poet, Zope)
would support DOM access to the objects in the database through
CORBA. AFAIK, Oracle already uses an ORB to facilitate integration.

 > 2.  Most people will access the DOM via attributes.
I would not mind to use attributes.

However, I would like that your experience and techniques
to use Python attributes for IDL attributes is
communicated to the DO-SIG and that the IDL->Python mapping
uses attributes, too.

 > 3.  We need a DOM language mapping document.
I would prefer, that this documents specifies:

  take the DOM IDL specification, combine it with
  the IDL->Python mapping and you get the
  Python DOM API.

 > 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.
You should not use "__".

While "_" has no special meaning in *method/attribute* names (unlike
module variable names!), "__" prefix makes the method/attribute
really private, it can only be used inside the class and
no longer (without special knowledge) from outside or even in
a derived class.

 > If all are good with this, then we should start down this path.  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....
You may depricate it, but please continue to support it -- 
for people that know IDL and use the IDL->Python mapping.