Code Objects — Python 3.16.0a0 documentation

docs.python.org

Tin mới

Python Module Index

3.16.0a0 Documentation

Python/C API reference manual

Concrete Objects Layer

free (closure) variables

Return the number of free (closure) variables in a code object.

PyFrame_GetLineNumber()

Return the line number of the instruction that occurs on or before byte_offset and ends after it. If you just need the line number of a frame, use PyFrame_GetLineNumber() instead.

PyErr_WriteUnraisable()

If event is PY_CODE_EVENT_CREATE, then the callback is invoked after co has been fully initialized. Otherwise, the callback is invoked before the destruction of co takes place, so the prior state of co can be inspected.

codeobject.co_flags

Code objects contain a bit-field of flags, which can be retrieved as the co_flags Python attribute (for example using PyObject_GetAttrString()), and set using a flags argument to PyUnstable_Code_New() and similar functio

PyObject_GetAttrString()

Code objects contain a bit-field of flags, which can be retrieved as the co_flags Python attribute (for example using PyObject_GetAttrString()), and set using a flags argument to PyUnstable_Code_New() and similar functio

PyCompilerFlags.cf_flags

Code objects contain a bit-field of flags, which can be retrieved as the co_flags Python attribute (for example using PyObject_GetAttrString()), and set using a flags argument to PyUnstable_Code_New() and similar functio

inspect.CO_OPTIMIZED

__future__.division