[Python-Dev] Rich comparison confusion
Moshe Zadka
moshez@zadka.site.co.il
Thu, 18 Jan 2001 02:08:06 +0200 (IST)
On Wed, 17 Jan 2001 09:17:39 -0600 (CST), Skip Montanaro <skip@mojam.com> wrote:
> I'm a bit confused about Guido's rich comparison stuff. In the description
> he states that __le__ and __ge__ are inverses as are __lt__ and __gt__.
I think that you're confused between two meanings of inverses.
You think:
op is an inverse of op' if for every a,b (a op b) = not (a op' b)
Guido meant (and I hope, implemented):
op is an inverse of op' if for every a,b (a op b) = (b op' a)
And a<b iff b>a
a<=b iff b>=a
Sounds sane.
Unless I'm the one confused....
--
Moshe Zadka <sig@zadka.site.co.il>
This is a signature anti-virus.
Please stop the spread of signature viruses!