Reflection — Python 3.14.7 documentation

docs.python.org

Tin mới

Codec registry and support functions

Python Module Index

3.14.7 Documentation

Python/C API reference manual

PyFrame_GetLocals()

Deprecated since version 3.13: Use either PyEval_GetFrameLocals() to obtain the same behaviour as calling locals() in Python code, or else call PyFrame_GetLocals() on the result of PyEval_GetFrame() to access the f_local

borrowed reference

Deprecated since version 3.13: Use either PyEval_GetFrameLocals() to obtain the same behaviour as calling locals() in Python code, or else call PyFrame_GetLocals() on the result of PyEval_GetFrame() to access the f_local

FrameType.f_locals

Changed in version 3.13: As part of PEP 667, PyFrame_GetLocals(), locals(), and FrameType.f_locals no longer make use of the shared cache dictionary. Refer to the What’s New entry for additional details.

PyThreadState_GetFrame()

Return the attached thread state’s frame, which is NULL if no frame is currently executing.