diff options
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index e29be5a070..cfa5f53634 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -824,10 +824,8 @@ string_richcompare(PyStringObject *a, PyStringObject *b, int op) int min_len; PyObject *result; - /* May sure both arguments use string comparison. - This implies PyString_Check(a) && PyString_Check(b). */ - if (a->ob_type->tp_richcompare != (richcmpfunc)string_richcompare || - b->ob_type->tp_richcompare != (richcmpfunc)string_richcompare) { + /* Make sure both arguments are strings. */ + if (!(PyString_Check(a) && PyString_Check(b))) { result = Py_NotImplemented; goto out; } |