Pelokalan
Python ID
id en
Masuk
Proyek
c-api__code.po Berkas proyek · python-docs-id-3.14 · Bahasa Indonesia
Modul PO Hanya lihat
Teks sumber — English
Terjemahan — Bahasa Indonesia
The C structure of the objects used to describe code objects. The fields of this type are subject to change at any time.
Struktur C dari objek yang digunakan untuk menggambarkan objek kode. Jenis dari tipe ini dapat berubah sewaktu-waktu.
This is an instance of :c:type:`PyTypeObject` representing the Python :ref:`code object <code-objects>`.
Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong reference to a :c:type:`PyBytesObject` representing the bytecode in a code object. On error, ``NULL`` is returned and an exception is raised.
Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new reference to a :c:type:`PyTupleObject` containing the names of the local variables. On error, ``NULL`` is returned and an exception is raised.
Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new reference to a :c:type:`PyTupleObject` containing the names of the local variables that are referenced by nested functions. On error, ``NULL`` is returned and an exception is raised.
Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new reference to a :c:type:`PyTupleObject` containing the names of the :term:`free (closure) variables <closure variable>`. On error, ``NULL`` is returned and an exception is raised.
Apply the macro *V* to each suffix of :c:type:`PyCodeEvent` constants. Currently expands to ``V(CREATE) V(DESTROY)``. The macro *V* must accept one event name and supply any punctuation needed between expansions.
Type of a code object watcher callback function.
If *free* is not ``NULL``: when a code object is deallocated, *free* will be called on non-``NULL`` data stored under the new index. Use :c:func:`Py_DecRef` when storing :c:type:`PyObject`.