Teks sumber — English
Terjemahan — Bahasa Indonesia
Slice Objects
Objek Slice
The type object for slice objects. This is the same as :class:`slice` in the Python layer.
Objek tipe untuk objek slice. Objek ini sama dengan :class:`slice` pada lapisan Python.
Return true if *ob* is a slice object; *ob* must not be ``NULL``. This function always succeeds.
Mengembalikan true jika *ob* adalah objek slice; *ob* tidak boleh ``NULL``. Fungsi ini selalu berhasil.
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.
Mengembalikan objek slice baru dengan nilai yang diberikan. Parameter *start*, *stop*, dan *step* digunakan sebagai nilai dari atribut objek slice dengan nama yang sama. Nilai mana pun boleh ``NULL``, dalam hal ini ``None`` akan digunakan untuk atribut yang bersangkutan.
Return ``NULL`` with an exception set if the new object could not be allocated.
Mengembalikan ``NULL`` dengan eksepsi yang ditetapkan jika objek baru tidak dapat dialokasikan.
Retrieve the start, stop and step indices from the slice object *slice*, assuming a sequence of length *length*. Treats indices greater than *length* as errors.
Mengambil indeks start, stop, dan step dari objek slice *slice*, dengan asumsi urutan sepanjang *length*. Indeks yang lebih besar dari *length* diperlakukan sebagai kesalahan.
The parameter type for the *slice* parameter was ``PySliceObject*`` before.
Tipe parameter untuk parameter *slice* sebelumnya adalah ``PySliceObject*``.
Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, stop, and step indices from the slice object *slice* assuming a sequence of length *length*, and store the length of the slice in *slicelength*. Out of bounds indices are clipped in a manner consistent with the handling of normal slices. *length* must not be negative.
Pengganti yang dapat digunakan untuk :c:func:`PySlice_GetIndices`. Mengambil indeks start, stop, dan step dari objek slice *slice* dengan asumsi urutan sepanjang *length*, dan menyimpan panjang slice dalam *slicelength*. Indeks di luar batas dipotong dengan cara yang konsisten dengan penanganan slice normal. *length* tidak boleh negatif.
Extract the start, stop and step data members from a slice object as C integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to ``PY_SSIZE_T_MAX``, silently boost the start and stop values less than ``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``.
Mengekstrak anggota data start, stop, dan step dari objek slice sebagai integer C. Secara diam-diam mengurangi nilai yang lebih besar dari ``PY_SSIZE_T_MAX`` menjadi ``PY_SSIZE_T_MAX``, secara diam-diam menaikkan nilai start dan stop yang kurang dari ``PY_SSIZE_T_MIN`` menjadi ``PY_SSIZE_T_MIN``, dan secara diam-diam menaikkan nilai step yang kurang dari ``-PY_SSIZE_T_MAX`` menjadi ``-PY_SSIZE_T_MAX``.
Ellipsis Object
Objek Ellipsis
The type of Python :const:`Ellipsis` object. Same as :class:`types.EllipsisType` in the Python layer.
Tipe objek :const:`Ellipsis` Python. Sama dengan :class:`types.EllipsisType` pada lapisan Python.
The Python ``Ellipsis`` object. This object has no methods. Like :c:data:`Py_None`, it is an :term:`immortal` singleton object.
Objek ``Ellipsis`` Python. Objek ini tidak memiliki metode. Seperti :c:data:`Py_None`, objek ini adalah objek singleton :term:`immortal`.