[Python-Dev] Rich comparisons shortcut (original) (raw)
Jewett, Jim J jim.jewett at eds.com
Tue Mar 30 16:11:31 EST 2004
- Previous message: [Python-Dev] PEP 318: Decorators last before colon
- Next message: [Python-Dev] Re: Rich comparisons
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Version 2.215 (Mar 21, 2004) of object.c assumes that identity implies equality.
I won't rehash the discussion about custom objects and NaN. I do think the decision should be reasonably consistent. The current CVS version shortcuts for == and !=, but not for the other operators.
Normally,
x == y implies
x <= y
x >= y
not x < y
not x > y
(in addition to) not x != y
I think any object that intentionally violates these rules is likely to also violate the (is implies ==) assumption.
-jJ
- Previous message: [Python-Dev] PEP 318: Decorators last before colon
- Next message: [Python-Dev] Re: Rich comparisons
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]