Pelokalan
Python ID
id en
Masuk
Proyek
c-api__concrete.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
The functions in this chapter are specific to certain Python object types. Passing them an object of the wrong type is not a good idea; if you receive an object from a Python program and you are not sure that it has the right type, you must perform a type check first; for example, to check that an object is a dictionary, use :c:func:`PyDict_Check`. The chapter is structured like the "family tree" of Python object types.
Fungsi dalam bab ini khusus untuk tipe objek Python tertentu. Mengisi mereka dengan objek dari tipe yang salah bukanlah ide yang baik; jika Anda menerima objek dari program Python dan Anda tidak yakin bahwa objek tersebut memiliki tipe yang tepat, Anda harus melakukan pemeriksaan jenis terlebih dahulu; misalnya, untuk memeriksa bahwa suatu objek adalah kamus (dictionary), gunakan :c:func:`PyDict_Check`. Bab ini disusun seperti "pohon keluarga" dari jenis objek Python.
While the functions described in this chapter carefully check the type of the objects which are passed in, many of them do not check for ``NULL`` being passed instead of a valid object. Allowing ``NULL`` to be passed in can cause memory access violations and immediate termination of the interpreter.
Walaupun fungsi yang dijelaskan dalam bab ini dengan cermat memeriksa jenis objek yang dilewatkan, banyak dari fungsi tersebut yang tidak memeriksa ``NULL`` yang dilewatkan dan menganggap objek yang valid. Mengizinkan ``NULL`` untuk dilewatkan dapat menyebabkan pelanggaran akses memori dan penghentian interpreter.