summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-30 16:46:59 (GMT)
committerGitHub <noreply@github.com>2017-03-30 16:46:59 (GMT)
commitbf4bb2e43030661e568d5d4b046e8b9351cc164c (patch)
treeb014ec3810488d4cb4995b9af1748302bd7b1ed2 /Modules
parenta6b4e1902250d6f28ca6d083ce1c8d7e9b91974b (diff)
downloadcpython-bf4bb2e43030661e568d5d4b046e8b9351cc164c.zip
cpython-bf4bb2e43030661e568d5d4b046e8b9351cc164c.tar.gz
cpython-bf4bb2e43030661e568d5d4b046e8b9351cc164c.tar.bz2
bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907)
when pass indices of wrong type. (cherry picked from commit d4edfc9abffca965e76ebc5957a92031a4d6c4d4)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_collectionsmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index e6111c6..3015770 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -1051,8 +1051,8 @@ deque_index(dequeobject *deque, PyObject *args)
int cmp;
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(deque);