gh-118934: Fix PyEval_GetLocals docs (PEP 667) by ncoghlan · Pull Request #119932 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions Doc/c-api/reflection.rst
4 changes: 2 additions & 2 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1347,13 +1347,13 @@ Special read-only attributes
``object.__getattr__`` with arguments ``obj`` and ``"f_code"``.

* - .. attribute:: frame.f_locals
- The dictionary used by the frame to look up
- The mapping used by the frame to look up
:ref:`local variables <naming>`.
If the frame refers to an :term:`optimized scope`,
this may return a write-through proxy object.

.. versionchanged:: 3.13
Return a proxy for functions and comprehensions.
Return a proxy for optimized scopes.

* - .. attribute:: frame.f_globals
- The dictionary used by the frame to look up
Expand Down
36 changes: 28 additions & 8 deletions Doc/whatsnew/3.13.rst