[XML-SIG] Specializing DOM exceptions
uche.ogbuji@fourthought.com
uche.ogbuji@fourthought.com
Tue, 02 Jan 2001 09:37:33 -0700
> 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 :" ?
Nope. It's all about developer's intertia, AKA cutnpasteitis.
--
Uche Ogbuji Principal Consultant
uche.ogbuji@fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python