7.5.7 Slice Objects

PyTypeObject PySlice_Type
The type object for slice objects. This is the same as types.SliceType.  

int PySlice_Check(PyObject *ob)
Returns true if ob is a slice object; ob must not be NULL.

PyObject* PySlice_New(PyObject *start, PyObject *stop, PyObject *step)
Return value: New reference.
Return a new slice object with the given values. The start, stop, and step parameters are used as the values of the slice object attributes of the same names. Any of the values may be NULL, in which case the None will be used for the corresponding attribute. Returns NULL if the new object could not be allocated.

int PySlice_GetIndices(PySliceObject *slice, int length, int *start, int *stop, int *step)

See About this document... for information on suggesting changes.