Obsolesence of <> (fwd)

please_no_spam_to_ D.M.Pick at qmw.ac.uk
Tue Jun 19 11:53:44 EDT 2001


James Logajan (JamesL at Lugoj.Com) wrote:

: Nicely done! You've worked out how to have your cake and Edith too! Now if I
: can only think of real world situation where <> does what you want and !=
: doesn't (since the latter seems to include the former, but note vice versa).
: Any case where an element of a ordered set can be NOT less than AND NOT
: greater than another element and still be NOT EQUAL to it? I'm not a
: mathematician, but do infinities have these properties?

A Group with a partial ordering?

Or something like an Object representing an CIDR IP range.
Then one might have:
	192.168.1.1    < 192.168.1.0/24 < 192.168.0.0/16
	                 192.168.2.0/24 < 192.168.0.0/16
	192.168.0.0/16 > 192.168.3.0/24
	192.168.0.0/16 <> 192.168.4.0
	192.168.1.0/24 != 192.168.2.0/24
all true, but:
	192.168.1.0/24 <> 192.168.2.0/24
is false when the relations are used to test if one CIDR block is
contained in the other.

-- 
	David Pick




More information about the Python-list mailing list