Pelokalan
Python ID
id en
Masuk
Proyek
c-api__iterator.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
Python provides two general-purpose iterator objects. The first, a sequence iterator, works with an arbitrary sequence supporting the :meth:`~object.__getitem__` method. The second works with a callable object and a sentinel value, calling the callable for each item in the sequence, and ending the iteration when the sentinel value is returned.
Type object for iterator objects returned by :c:func:`PySeqIter_New` and the one-argument form of the :func:`iter` built-in function for built-in sequence types.
Tipe objek untuk objek iterator yang dikembalikan oleh :c:func:`PySeqIter_New` dan bentuk satu argumen dari fungsi bawaan :func:`iter` untuk tipe urutan bawaan.
Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function always succeeds.
Mengembalikan nilai true jika tipe *op* adalah :c:data:`PySeqIter_Type`. Fungsi ini selalu berhasil.
Return an iterator that works with a general sequence object, *seq*. The iteration ends when the sequence raises :exc:`IndexError` for the subscripting operation.
Mengembalikan iterator yang bekerja dengan objek urutan umum, *seq*. Iterasi berakhir ketika urutan tersebut menghasilkan :exc:`IndexError` untuk operasi subskrip.
Type object for iterator objects returned by :c:func:`PyCallIter_New` and the two-argument form of the :func:`iter` built-in function.
Tipe objek untuk objek iterator yang dikembalikan oleh :c:func:`PyCallIter_New` dan bentuk dua argumen dari fungsi bawaan :func:`iter` .
Return true if the type of *op* is :c:data:`PyCallIter_Type`. This function always succeeds.
Mengembalikan nilai true jika tipe *op* adalah :c:data:`PyCallIter_Type`. Fungsi ini selalu berhasil.
Return a new iterator. The first parameter, *callable*, can be any Python callable object that can be called with no parameters; each call to it should return the next item in the iteration. When *callable* returns a value equal to *sentinel*, the iteration will be terminated.
Mengembalikan iterator baru. Parameter pertama, *callable*, dapat berupa objek Python callable apa saja yang bisa dipanggil tanpa parameter; setiap pemanggilan harus mengembalikan butir (item) berikutnya pada iterator. Ketika *callable* mengembalikan nilai sama dengan *sentinel*, perulangan akan dihentikan.
Return true if the object *o* is an instance of a :class:`range` object. This function always succeeds.