summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-30 17:31:46 (GMT)
committerGitHub <noreply@github.com>2017-03-30 17:31:46 (GMT)
commit8b8bde44f3912d8b2df5591ffc31d2d8c6dcca6c (patch)
treedbbba7ea81cac0fe4ccbc5cec45227a50decf3f3 /Objects/tupleobject.c
parentc90ff1b78cb79bc3762184e03fa81f11984aaa45 (diff)
downloadcpython-8b8bde44f3912d8b2df5591ffc31d2d8c6dcca6c.zip
cpython-8b8bde44f3912d8b2df5591ffc31d2d8c6dcca6c.tar.gz
cpython-8b8bde44f3912d8b2df5591ffc31d2d8c6dcca6c.tar.bz2
bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907) (#909)
when pass indices of wrong type. (cherry picked from commit d4edfc9abffca965e76ebc5957a92031a4d6c4d4) (cherry picked from commit bf4bb2e43030661e568d5d4b046e8b9351cc164c)
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 7920fec..4871945 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -515,8 +515,8 @@ tupleindex(PyTupleObject *self, PyObject *args)
PyObject *v;
if (!PyArg_ParseTuple(args, "O|O&O&:index", &v,
- _PyEval_SliceIndex, &start,
- _PyEval_SliceIndex, &stop))
+ _PyEval_SliceIndexNotNone, &start,
+ _PyEval_SliceIndexNotNone, &stop))
return NULL;
if (start < 0) {
start += Py_SIZE(self);