summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-30 15:29:23 (GMT)
committerGitHub <noreply@github.com>2017-03-30 15:29:23 (GMT)
commitd4edfc9abffca965e76ebc5957a92031a4d6c4d4 (patch)
treed985a5ba3c7dd8ec3183014962d650724f61ece9 /Objects/tupleobject.c
parent762ec97ea68a1126b8855996c61fa8239dc9fff7 (diff)
downloadcpython-d4edfc9abffca965e76ebc5957a92031a4d6c4d4.zip
cpython-d4edfc9abffca965e76ebc5957a92031a4d6c4d4.tar.gz
cpython-d4edfc9abffca965e76ebc5957a92031a4d6c4d4.tar.bz2
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/tupleobject.c')
-rw-r--r--Objects/tupleobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 9c63983..55da0e3 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -534,8 +534,8 @@ tuplerepeat(PyTupleObject *a, Py_ssize_t n)
tuple.index
value: object
- start: object(converter="_PyEval_SliceIndex", type="Py_ssize_t") = 0
- stop: object(converter="_PyEval_SliceIndex", type="Py_ssize_t", c_default="PY_SSIZE_T_MAX") = sys.maxsize
+ start: slice_index(accept={int}) = 0
+ stop: slice_index(accept={int}, c_default="PY_SSIZE_T_MAX") = sys.maxsize
/
Return first index of value.
@@ -546,7 +546,7 @@ Raises ValueError if the value is not present.
static PyObject *
tuple_index_impl(PyTupleObject *self, PyObject *value, Py_ssize_t start,
Py_ssize_t stop)
-/*[clinic end generated code: output=07b6f9f3cb5c33eb input=28890d4bec234471]*/
+/*[clinic end generated code: output=07b6f9f3cb5c33eb input=fb39e9874a21fe3f]*/
{
Py_ssize_t i;