bpo-29748: Added the slice index converter in Argument Clinic. (#549)

This commit is contained in:
Serhiy Storchaka 2017-03-19 19:37:40 +02:00 committed by GitHub
parent a5af6e1af7
commit 80ec8364f1
5 changed files with 25 additions and 3 deletions

View file

@ -2210,8 +2210,8 @@ PyList_AsTuple(PyObject *v)
list.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.
@ -2222,7 +2222,7 @@ Raises ValueError if the value is not present.
static PyObject *
list_index_impl(PyListObject *self, PyObject *value, Py_ssize_t start,
Py_ssize_t stop)
/*[clinic end generated code: output=ec51b88787e4e481 input=70b7247e398a6999]*/
/*[clinic end generated code: output=ec51b88787e4e481 input=40ec5826303a0eb1]*/
{
Py_ssize_t i;