[XML-SIG] foo.bar vs. foo.get_bar()
Andrew M. Kuchling
akuchlin@mems-exchange.org
Fri, 5 Nov 1999 21:42:55 -0500 (EST)
Carey Evans writes:
>Has anyone tried this? PyDOM includes __getattr__ and __setattr__,
>but doesn't actually use them. As a simple test, I ran a small
<startled blink> Huh? Doesn't use them? Are you sure this is with
the current version of PyDOM? It most certainly will not work
without the __getattr__; the test suite crashes when you try it
(Internally, though, the code never uses bar attributes like
.parentNode, calling .get_parentNode() to save the expense of going
through __getattr__ to call .get_parentNode(), so the stuff in
dom.core.py might well work without the __getattr__ method. Callers
will definitely break, though.)
--
A.M. Kuchling http://starship.python.net/crew/amk/
Mathematics transfigures the fortuitous concourse of atoms into the tracery of
the finger of God.
-- Herbert Westren Turnbull