Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 20140:225f17ec8932 legacy-trunk
Merge branch changes (coercion, rich comparisons) into trunk.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 27 Sep 2001 20:30:07 +0000 |
| parents | 5b1ad7acabb5 |
| children | abaf9ea2e560 |
line wrap: on
line diff
--- a/Objects/stringobject.c Thu Sep 27 20:11:07 2001 +0000 +++ b/Objects/stringobject.c Thu Sep 27 20:30:07 2001 +0000 @@ -824,10 +824,8 @@ 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; }
