From 9e9dcd6d4225faa6a8b19120f009e0253d16ab92 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 17 Oct 2008 01:50:37 +0000 Subject: STINNER Victor (haypo)'s patch for bug 3988, Byte warning mode and b'' != '' Also, his patch to runtests.sh to pass the -bb option (issue 4125). --- Objects/bytesobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/bytesobject.c') diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 0d0efc9689..76b7f52200 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -818,7 +818,7 @@ string_richcompare(PyBytesObject *a, PyBytesObject *b, int op) /* Make sure both arguments are strings. */ if (!(PyBytes_Check(a) && PyBytes_Check(b))) { - if (Py_BytesWarningFlag && (op == Py_EQ) && + if (Py_BytesWarningFlag && (op == Py_EQ || op == Py_NE) && (PyObject_IsInstance((PyObject*)a, (PyObject*)&PyUnicode_Type) || PyObject_IsInstance((PyObject*)b, -- cgit v1.2.1