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

Paul Prescod paul@prescod.net
Mon, 26 Jun 2000 08:28:02 -0700

Jim Fulton wrote:
> ...
> Yup, however __getattr__ is a pain to utilize unless you have alot of
> infrustructure.  Zope has support for computed attributes, which makes
> this pretty sane, especially for read-only attributes.  

a) I think all that you need is a base class. Minidom uses one and it
seems to work. Anyhow, inherting from "node" is good practice in any DOM
extension framework.

b) I have been pushing for computed attributes in standard Python for
about three or four years. If this gives someone the impetus to
implement it, I won't be overly distraught. :)

	- Python-1.7-is-just-around-the-corner-ly 'yrs
 Paul Prescod - Not encumbered by corporate consensus
"If I say something, yet it does not fill you with the immediate
burning desire to voluntarily show it to everyone you know, well then,
it's probably not all that important."
    - http://www.bespoke.org/viridian/