Issue #1393: object_richcompare() returns NotImplemented instead of
False if the objects aren't equal, to give the other side a chance.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 982eedb..2a0dd24 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2484,7 +2484,10 @@
switch (op) {
case Py_EQ:
- res = (self == other) ? Py_True : Py_False;
+ /* Return NotImplemented instead of False, so if two
+ objects are compared, both get a chance at the
+ comparison. See issue #1393. */
+ res = (self == other) ? Py_True : Py_NotImplemented;
Py_INCREF(res);
break;