切片对象
********

PyTypeObject PySlice_Type

   切片对象的类型对象。 它与 Python 层面的 "slice" 是相同的对象。

int PySlice_Check(PyObject *ob)

   Return 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.  Return *NULL* if the new object could not be allocated.

int PySlice_GetIndices(PyObject *slice, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step)

   从 slice 对象 *slice* 提取 start, stop 和 step 索引号，将序列长度视
   为 *length*。 大于 *length* 的序列号将被当作错误。

   成功时返回 "0"，出错时返回 "-1" 并且不设置异常（除非某个序列号不为
   "None" 且无法被转换为整数，在这种情况下会返回 "-1" 并且设置一个异常
   ）。

   你可能不会打算使用此函数。

   在 3.2 版更改: 之前 *slice* 形参的形参类型是 "PySliceObject*"。

int PySlice_GetIndicesEx(PyObject *slice, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)

   "PySlice_GetIndices()" 的可用替代。 从 slice 对象 *slice* 提取
   start, stop 和 step 索引号，将序列长度视为 *length*，并将切片的长度
   保存在 *slicelength* 中，超出范围的索引号会以与普通切片一致的方式进
   行剪切。

   成功时返回 "0"，出错时返回 "-1" 并且不设置异常。

   在 3.2 版更改: 之前 *slice* 形参的形参类型是 "PySliceObject*"。


Ellipsis 对象
*************

PyObject *Py_Ellipsis

   Python 的 "Ellipsis" 对象。 该对象没有任何方法。 它必须以与任何其他
   对象一样的方式遵循引用计数。 它与 "Py_None" 一样是单例对象。
