From 0a478a5bb33f9363193ca90b800dec4e3af5d6b3 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 16 Dec 2002 22:32:46 +0000 Subject: [PATCH] try_3way_compare() was returning -1 in one case where it should return -2 (i.e. an exception was set). (This was already fixed in 2.3 through a different refactoring.) Worth the release of Pyton 2.2.3? Eventually, I guess... --- Objects/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/object.c b/Objects/object.c index b14a9c07e8c2..d68356f9e7ad 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -482,7 +482,7 @@ try_3way_compare(PyObject *v, PyObject *w) if (f != NULL && f == w->ob_type->tp_compare) { c = (*f)(v, w); if (c < 0 && PyErr_Occurred()) - return -1; + return -2; return c < 0 ? -1 : c > 0 ? 1 : 0; } -- 2.47.3