[I18n-sig] Re: [Python-Dev] Unicode comparisons & normalization
Guido van Rossum
Wed, 03 May 2000 07:12:44 -0400
> This would be another motivation for Python to carefully
> separate the three types of equality:
> is identity-equal
> == value-equal
> <=> magnitude-equal
> We currently don't distinguish between the last two;
> the operator "<=>" is my proposal for how to spell
> "magnitude-equal", and in terms of outward behaviour
> you can consider (a <=> b) to be (a <= b and a >= b).
> I suspect we will find ourselves needing it if we do
> rich comparisons anyway.
I don't think that this form of equality deserves its own operator.
The Unicode comparison rules are sufficiently hairy that it seems
better to implement them separately, either in a separate module or at
least as a Unicode-object-specific method, and let the == operator do
what it does best: compare the representations.
--Guido van Rossum (home page: http://www.python.org/~guido/)