You are not logged in Log in Join
You are here: Home » Members » jim » ZDOM-save » Leading underscores in DOM python binding » wikipage_view

Log in



Leading underscores in DOM python binding


The DOM python binding defines that all read attributes are mapped to an accessor function in the form of _get_attr.



Then we should support this. What was the rational for this? Names with leading underscores are traditionally private.

I suggest we support:

  • e._get_foo(),
  • e.getFoo(), and

(Mike) It is my understanding that the names with starting with _ will not be accessible from some protocols.

The rational is that people are supposed to use the access method. e._get_foo is the mapping for computed attributes (just like the CORBA binding) and is not meant to be called. However, there are no restrictions about not calling this.

Currently I have implemented support for all three access methods.