mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
* [3.11] gh-101100: Properly document frame object attributes (#112735)
(cherry-picked from commit d109f637c0
)
This commit is contained in:
parent
36f6fa4640
commit
c26d6c1aba
12 changed files with 99 additions and 59 deletions
|
@ -50,7 +50,7 @@ See also :ref:`Reflection <reflection>`.
|
|||
|
||||
.. c:function:: PyObject* PyFrame_GetBuiltins(PyFrameObject *frame)
|
||||
|
||||
Get the *frame*'s ``f_builtins`` attribute.
|
||||
Get the *frame*'s :attr:`~frame.f_builtins` attribute.
|
||||
|
||||
Return a :term:`strong reference`. The result cannot be ``NULL``.
|
||||
|
||||
|
@ -81,7 +81,7 @@ See also :ref:`Reflection <reflection>`.
|
|||
|
||||
.. c:function:: PyObject* PyFrame_GetGlobals(PyFrameObject *frame)
|
||||
|
||||
Get the *frame*'s ``f_globals`` attribute.
|
||||
Get the *frame*'s :attr:`~frame.f_globals` attribute.
|
||||
|
||||
Return a :term:`strong reference`. The result cannot be ``NULL``.
|
||||
|
||||
|
@ -90,7 +90,7 @@ See also :ref:`Reflection <reflection>`.
|
|||
|
||||
.. c:function:: int PyFrame_GetLasti(PyFrameObject *frame)
|
||||
|
||||
Get the *frame*'s ``f_lasti`` attribute.
|
||||
Get the *frame*'s :attr:`~frame.f_lasti` attribute.
|
||||
|
||||
Returns -1 if ``frame.f_lasti`` is ``None``.
|
||||
|
||||
|
@ -99,7 +99,7 @@ See also :ref:`Reflection <reflection>`.
|
|||
|
||||
.. c:function:: PyObject* PyFrame_GetLocals(PyFrameObject *frame)
|
||||
|
||||
Get the *frame*'s ``f_locals`` attribute (:class:`dict`).
|
||||
Get the *frame*'s :attr:`~frame.f_locals` attribute (:class:`dict`).
|
||||
|
||||
Return a :term:`strong reference`.
|
||||
|
||||
|
|
|
@ -1620,7 +1620,8 @@ Python-level trace functions in previous versions.
|
|||
|
||||
The value passed as the *what* parameter to a :c:type:`Py_tracefunc` function
|
||||
(but not a profiling function) when a line-number event is being reported.
|
||||
It may be disabled for a frame by setting :attr:`f_trace_lines` to *0* on that frame.
|
||||
It may be disabled for a frame by setting :attr:`~frame.f_trace_lines` to
|
||||
*0* on that frame.
|
||||
|
||||
|
||||
.. c:var:: int PyTrace_RETURN
|
||||
|
@ -1652,7 +1653,7 @@ Python-level trace functions in previous versions.
|
|||
The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but not
|
||||
profiling functions) when a new opcode is about to be executed. This event is
|
||||
not emitted by default: it must be explicitly requested by setting
|
||||
:attr:`f_trace_opcodes` to *1* on the frame.
|
||||
:attr:`~frame.f_trace_opcodes` to *1* on the frame.
|
||||
|
||||
|
||||
.. c:function:: void PyEval_SetProfile(Py_tracefunc func, PyObject *obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue