diff options
author | Thomas Wouters <thomas@python.org> | 2007-08-28 23:07:26 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2007-08-28 23:07:26 (GMT) |
commit | 3e57b52bb800b8d001092490f2a658271d613d6d (patch) | |
tree | 0f46893256c6505d4026f03ffb8f625a4fb0527f /Objects | |
parent | ed03b4121ead78df76f6882de5eca01b7a3a628c (diff) | |
download | cpython-3e57b52bb800b8d001092490f2a658271d613d6d.zip cpython-3e57b52bb800b8d001092490f2a658271d613d6d.tar.gz cpython-3e57b52bb800b8d001092490f2a658271d613d6d.tar.bz2 |
Fix buglet in sliceobjects, they were not returning Py_NotImplemented when
compared against something other than sliceobjects.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/sliceobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c index 498172d..eb66c79 100644 --- a/Objects/sliceobject.c +++ b/Objects/sliceobject.c @@ -286,6 +286,11 @@ slice_richcompare(PyObject *v, PyObject *w, int op) PyObject *t2; PyObject *res; + if (!PySlice_Check(v) || !PySlice_Check(w)) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + if (v == w) { /* XXX Do we really need this shortcut? There's a unit test for it, but is that fair? */ |