Teks sumber — English
Terjemahan — Bahasa Indonesia
These formats allow accessing an object as a contiguous chunk of memory. You don't have to provide raw storage for the returned unicode or bytes area.
Formaty te umożliwiają dostęp do obiektu jako ciągłego fragmentu pamięci. Nie musisz zapewniać nieprzetworzonej pamięci dla zwróconego obszaru unicode lub bajtów.
where *object* is the Python object to be converted and *address* is the :c:expr:`void*` argument that was passed to the ``PyArg_Parse*`` function. The returned *status* should be ``1`` for a successful conversion and ``0`` if the conversion has failed. When the conversion fails, the *converter* function should raise an exception and leave the content of *address* unmodified.
di mana *object* adalah objek Python yang akan dikonversi dan *address* adalah argumen :c:expr:`void*` yang diteruskan ke fungsi ``PyArg_Parse*``. *status* yang dikembalikan harus ``1`` untuk konversi yang berhasil dan ``0`` jika konversi gagal. Ketika konversi gagal, fungsi *converter* akan memunculkan pengecualian dan membiarkan konten *address* tidak diubah.
Create a new value based on a format string similar to those accepted by the ``PyArg_Parse*`` family of functions and a sequence of values. Returns the value or ``NULL`` in the case of an error; an exception will be raised if ``NULL`` is returned.
Membuat nilai baru berdasarkan string format yang mirip dengan yang diterima oleh keluarga fungsi ``PyArg_Parse*`` dan urutan nilai. Mengembalikan nilai atau ``NULL`` jika terjadi kesalahan; pengecualian akan dimunculkan jika ``NULL`` dikembalikan.
Convert a C string and its length to a Python :class:`str` object using ``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is ignored and ``None`` is returned.
This converts a C string to a Python :class:`bytes` object. If the C string pointer is ``NULL``, ``None`` is returned.
This converts a C string and its lengths to a Python object. If the C string pointer is ``NULL``, ``None`` is returned.
Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or UCS-4) data to a Python Unicode object. If the Unicode buffer pointer is ``NULL``, ``None`` is returned.
Mengonversi buffer :c:type:`wchar_t` yang diakhiri dengan nol dari data Unicode (UTF-16 atau UCS-4) menjadi objek Python Unicode. Jika penunjuk buffer Unicode adalah ``NULL``, ``None`` akan dikembalikan.
Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python Unicode object. If the Unicode buffer pointer is ``NULL``, the length is ignored and ``None`` is returned.
If there is an error in the format string, the :exc:`SystemError` exception is set and ``NULL`` returned.