Lines Matching refs:index
305 * <report index out of bounds>
319 "range object index out of range");
579 Py_ssize_t index;
580 index = _PySequence_IterSearch((PyObject*)r, ob, PY_ITERSEARCH_INDEX);
581 if (index == -1)
583 return PyLong_FromSsize_t(index);
698 "rangeobject.index(value) -> integer -- return index of value.\n"
705 {"index", (PyCFunction)range_index, METH_O, index_doc},
767 long index;
776 if (r->index < r->len)
780 (unsigned long)(r->index++) * r->step));
787 return PyLong_FromLong(r->len - r->index);
815 "N(N)l", _PyEval_GetBuiltin(&_Py_ID(iter)), range, r->index);
826 long index = PyLong_AsLong(state);
827 if (index == -1 && PyErr_Occurred())
829 /* silently clip the index value */
830 if (index < 0)
831 index = 0;
832 else if (index > r->len)
833 index = r->len; /* exhausted iterator */
834 r->index = index;
924 it->index = 0;
930 PyObject *index;
939 return PyNumber_Subtract(r->len, r->index);
969 "N(N)O", _PyEval_GetBuiltin(&_Py_ID(iter)), range, r->index);
993 Py_XSETREF(r->index, state);
1010 Py_XDECREF(r->index);
1021 if (PyObject_RichCompareBool(r->index, r->len, Py_LT) != 1)
1024 new_index = PyNumber_Add(r->index, _PyLong_GetOne());
1028 product = PyNumber_Multiply(r->index, r->step);
1037 Py_SETREF(r->index, new_index);
1131 it->index = _PyLong_GetZero();
1135 Py_INCREF(it->index);
1213 it->index = it->start = it->step = NULL;
1238 it->index = _PyLong_GetZero();
1239 Py_INCREF(it->index);