W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: [XML-SIG] RE: Equality tests on DOM nodes

From: John Cowan <cowan@locke.ccil.org>
Date: Mon, 14 Dec 1998 16:56:38 -0500
Message-ID: <36758996.B9842B78@locke.ccil.org>
To: DOM List <www-dom@w3.org>, xml-sig@python.org
Fred L. Drake wrote:

> Typically,
> two Python objects (let's take lists as an examples) are considered
> equal if their contents are the same; equality of two objects is not
> considered to be an unchangable characteristic.

The trouble with that scheme is that it makes equality hard to
reason about.  Intuitively, we expect equality to be transitive,
(if a = b and b = c then a = c), reflexive (a = a), and symmetrical
(if a = b then b = a).  Making equality depend on mutable properties
defeats this: a might = b at one time, but a later check for 
b = a might fail.

>         a.reverse()

I presume this is a *destructive* reverse (leaves a reversed)?
 
-- 
John Cowan	http://www.ccil.org/~cowan		cowan@ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)
Received on Monday, 14 December 1998 16:57:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:46 GMT