From 6ee42348025611f537b80d5dbf55f4d5b9bd58f2 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Fri, 6 Jul 2001 17:45:43 +0000 Subject: [PATCH] SF bug #439104: Tuple richcompares has code-typo. Symptom: (1, 2, 3) <= (1, 2) returned 1. This was already fixed in CVS for tuples, but an isomorphic error was in the list richcompare code. --- Objects/listobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/listobject.c b/Objects/listobject.c index 6fb3145d362..7166ced8cb4 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -1512,7 +1512,7 @@ list_richcompare(PyObject *v, PyObject *w, int op) PyObject *res; switch (op) { case Py_LT: cmp = vs < ws; break; - case Py_LE: cmp = ws <= ws; break; + case Py_LE: cmp = vs <= ws; break; case Py_EQ: cmp = vs == ws; break; case Py_NE: cmp = vs != ws; break; case Py_GT: cmp = vs > ws; break;