summaryrefslogtreecommitdiff
path: root/Objects/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-30 18:29:23 +0300
committerGitHub <noreply@github.com>2017-03-30 18:29:23 +0300
commitd4edfc9abffca965e76ebc5957a92031a4d6c4d4 (patch)
treed985a5ba3c7dd8ec3183014962d650724f61ece9 /Objects/clinic
parent762ec97ea68a1126b8855996c61fa8239dc9fff7 (diff)
downloadcpython-git-d4edfc9abffca965e76ebc5957a92031a4d6c4d4.tar.gz
bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887)
when pass indices of wrong type.
Diffstat (limited to 'Objects/clinic')
-rw-r--r--Objects/clinic/listobject.c.h4
-rw-r--r--Objects/clinic/tupleobject.c.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h
index eeb932a240..43d5599d7a 100644
--- a/Objects/clinic/listobject.c.h
+++ b/Objects/clinic/listobject.c.h
@@ -196,7 +196,7 @@ list_index(PyListObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwna
Py_ssize_t stop = PY_SSIZE_T_MAX;
if (!_PyArg_ParseStack(args, nargs, "O|O&O&:index",
- &value, _PyEval_SliceIndex, &start, _PyEval_SliceIndex, &stop)) {
+ &value, _PyEval_SliceIndexNotNone, &start, _PyEval_SliceIndexNotNone, &stop)) {
goto exit;
}
@@ -297,4 +297,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored))
{
return list___reversed___impl(self);
}
-/*[clinic end generated code: output=2a3b75efcf858ed5 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=71deae70ca0e6799 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/tupleobject.c.h b/Objects/clinic/tupleobject.c.h
index 12f0df1d43..880b258dca 100644
--- a/Objects/clinic/tupleobject.c.h
+++ b/Objects/clinic/tupleobject.c.h
@@ -26,7 +26,7 @@ tuple_index(PyTupleObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kw
Py_ssize_t stop = PY_SSIZE_T_MAX;
if (!_PyArg_ParseStack(args, nargs, "O|O&O&:index",
- &value, _PyEval_SliceIndex, &start, _PyEval_SliceIndex, &stop)) {
+ &value, _PyEval_SliceIndexNotNone, &start, _PyEval_SliceIndexNotNone, &stop)) {
goto exit;
}
@@ -99,4 +99,4 @@ tuple___getnewargs__(PyTupleObject *self, PyObject *Py_UNUSED(ignored))
{
return tuple___getnewargs___impl(self);
}
-/*[clinic end generated code: output=561a3654411d2225 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=145bcfff64e8c809 input=a9049054013a1b77]*/