diff options
author | Guido van Rossum <guido@python.org> | 2006-12-19 21:35:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-12-19 21:35:46 (GMT) |
commit | 9a4e95ccc89fa7723df3190555402ebefce7a21d (patch) | |
tree | 04a2cbf75a96314c493d7f8e1b5735e3ad659db1 | |
parent | 66a796e5ab8dd7bfc1fe05a830feb05acdab6f53 (diff) | |
download | cpython-9a4e95ccc89fa7723df3190555402ebefce7a21d.zip cpython-9a4e95ccc89fa7723df3190555402ebefce7a21d.tar.gz cpython-9a4e95ccc89fa7723df3190555402ebefce7a21d.tar.bz2 |
The opstrings table was backwards. Add an XXX comment.
-rw-r--r-- | Objects/object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c index 4d9f414..c07a369 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -619,7 +619,7 @@ PyObject_Compare(PyObject *v, PyObject *w) /* Map rich comparison operators to their swapped version, e.g. LT <--> GT */ int _Py_SwappedOp[] = {Py_GT, Py_GE, Py_EQ, Py_NE, Py_LT, Py_LE}; -static char *opstrings[] = {">", ">=", "==", "!=", "<", "<="}; +static char *opstrings[] = {"<", "<=", "==", "!=", ">", ">="}; /* Perform a rich comparison, raising TypeError when the requested comparison operator is not supported. */ @@ -659,6 +659,7 @@ do_richcompare(PyObject *v, PyObject *w, int op) res = (v != w) ? Py_True : Py_False; break; default: + /* XXX Special-case None so it doesn't show as NoneType() */ PyErr_Format(PyExc_TypeError, "unorderable types: %.100s() %s %.100s()", v->ob_type->tp_name, |