mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-101100: Properly document frame object attributes (#112735)
This commit is contained in:
parent
c2e2df8356
commit
d109f637c0
12 changed files with 88 additions and 49 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``.
|
||||
|
||||
|
@ -120,7 +120,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`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue