diff options
author | Guido van Rossum <guido@python.org> | 2001-09-27 20:30:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-09-27 20:30:07 (GMT) |
commit | 2ed6bf87c9ce5d2e8a0eb33f7aa6503196205a0c (patch) | |
tree | cb597e3c84bf6d845c849e5d715a011922337704 /Objects/stringobject.c | |
parent | 33f4d6d1db5dd915cce811bd6f7a963d4dbe8db2 (diff) | |
download | cpython-2ed6bf87c9ce5d2e8a0eb33f7aa6503196205a0c.zip cpython-2ed6bf87c9ce5d2e8a0eb33f7aa6503196205a0c.tar.gz cpython-2ed6bf87c9ce5d2e8a0eb33f7aa6503196205a0c.tar.bz2 |
Merge branch changes (coercion, rich comparisons) into trunk.
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 e29be5a..cfa5f53 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; } |