[E-Lang] Operators #2: Comparison
Ka-Ping Yee
ping@lfw.org
Tue, 10 Apr 2001 04:41:08 -0700 (PDT)
On Mon, 9 Apr 2001, Ralph Hartley wrote:
> Not defining it at all has its merits, but comparing the sets of keys
> isn't right anyway. The comparison of two maps should depend on the
> values, not just the keys. Here is a try at a definition:
Just for reference, in Python dictionaries compare according to the
lexicographic order of their sorted (key, value) lists. This is
expensive, but it seems to be the only easily understandable answer.
-- ?!ng
"All models are wrong; some models are useful."
-- George Box