Lines Matching refs:index

18 _Py_DECLARE_STR(list_err, "list index out of range");
250 _Py_DECLARE_STR(list_err, "list index out of range");
270 "list assignment index out of range");
793 "list assignment index out of range");
806 index: Py_ssize_t
810 Insert object before index.
814 list_insert_impl(PyListObject *self, Py_ssize_t index, PyObject *object)
817 if (ins1(self, index, object) == 0)
1023 index: Py_ssize_t = -1
1026 Remove and return item at index (default last).
1028 Raises IndexError if list is empty or index is out of range.
1032 list_pop_impl(PyListObject *self, Py_ssize_t index)
1043 if (index < 0)
1044 index += Py_SIZE(self);
1045 if (!valid_index(index, Py_SIZE(self))) {
1046 PyErr_SetString(PyExc_IndexError, "pop index out of range");
1049 v = self->ob_item[index];
1050 if (index == Py_SIZE(self) - 1) {
1058 status = list_ass_slice(self, index, index+1, (PyObject *)NULL);
1364 "hint" is an index at which to begin the search, 0 <= hint < n. The closer
1372 key belongs at index k; or, IOW, the first k elements of a should precede
1955 /* Two adjacent runs begin at index s1. The first run has length n1, and
1956 * the second run (starting at index s1+n1) has length n2. The list has total
2014 Py_ssize_t s1 = p[ms->n - 1].base.keys - ms->basekeys; /* start index */
2586 list.index
2593 Return first index of value.
2727 /* Search for the first index where items are different */
3284 Py_ssize_t index = PyLong_AsSsize_t(state);
3285 if (index == -1 && PyErr_Occurred())
3288 if (index < 0)
3289 index = 0;
3290 else if (index > PyList_GET_SIZE(it->it_seq))
3291 index = PyList_GET_SIZE(it->it_seq); /* iterator exhausted */
3292 it->it_index = index;
3394 Py_ssize_t index;
3404 index = it->it_index;
3405 if (index>=0 && index < PyList_GET_SIZE(seq)) {
3406 item = PyList_GET_ITEM(seq, index);
3435 Py_ssize_t index = PyLong_AsSsize_t(state);
3436 if (index == -1 && PyErr_Occurred())
3439 if (index < -1)
3440 index = -1;
3441 else if (index > PyList_GET_SIZE(it->it_seq) - 1)
3442 index = PyList_GET_SIZE(it->it_seq) - 1;
3443 it->it_index = index;
3459 /* the objects are not the same, index is of different types! */