[XML-SIG] Specializing DOM exceptions

Alexandre Fayolle Alexandre.Fayolle@logilab.fr
Tue, 2 Jan 2001 15:49:29 +0100 (CET)


Sorry to come back on last weeks mails, but I was offline for a while (and
this was really a *good* thing for my mental health). Anyway, a happy new
year to everyone here... 

On Sat, 23 Dec 2000 uche.ogbuji@fourthought.com wrote:

> Seriously, after a quick survey of my code, the only place I import Node is in 
> order to get at the constants.

Yup, I noticed this in 4Suite code, and I kept wondering about the
rational of doing so, since almost every object you manipulate _is_ a
node, and therefore has access to the class attributes. 
In other words a typical line of code is: 
"if some_node.nodeType == Node.ELEMENT_NODE :"

Is there a difference in performance with:
"if some_node.nodeType == some_node.ELEMENT_NODE :" ?

Alexandre Fayolle
-- 
http://www.logilab.com 
Narval is the first software agent available as free software (GPL).
LOGILAB, Paris (France).