Lines Matching refs:slice
4 This includes both the singular ellipsis object and slice objects.
154 PyObject *start, *end, *slice;
164 slice = PySlice_New(start, end, NULL);
167 return slice;
219 "slice step cannot be zero");
225 * does "step = -step" as part of a slice reversal.
310 if (!_PyArg_NoKeywords("slice", kw))
313 if (!PyArg_UnpackTuple(args, "slice", 1, 3, &start, &stop, &step))
326 "slice(stop)\n\
327 slice(start, stop[, step])\n\
329 Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).");
350 return PyUnicode_FromFormat("slice(%R, %R, %R)", r->start, r->stop, r->step);
360 /* Helper function to convert a slice argument to a PyLong, and raise TypeError
371 "slice indices must be integers or "
377 /* Compute slice indices given a slice and length. Return -1 on failure. Used
378 by slice.indices and rangeobject slicing. Assumes that `len` is a
404 "slice step cannot be zero");
522 /* Implementation of slice.indices. */
555 indices, and the stride length of the extended slice described by\n\
634 "slice", /* Name of this type */