Previous Page Up One Level Next Page Python/C API Reference Manual Contents Index
Previous: 7.5.6 Descriptor Objects Up: 7.5 Other Objects Next: 7.5.8 Weak Reference Objects


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)


Previous Page Up One Level Next Page Python/C API Reference Manual Contents Index
Previous: 7.5.6 Descriptor Objects Up: 7.5 Other Objects Next: 7.5.8 Weak Reference Objects
Release 2.2.3, documentation updated on 30 May 2003.
See About this document... for information on suggesting changes.

AltStyle によって変換されたページ (->オリジナル) /