summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorAlyssa Coghlan <ncoghlan@gmail.com>2024-06-02 04:44:29 (GMT)
committerGitHub <noreply@github.com>2024-06-02 04:44:29 (GMT)
commitfd6cd621e0cce6ba2e737103d2a62b5ade90f41f (patch)
tree470e7dbccebae7db66b4666e636edce75ef57dcb /Doc/reference
parente378dc15b52985724b6ae4782c4ef0afc3393ca9 (diff)
downloadcpython-fd6cd621e0cce6ba2e737103d2a62b5ade90f41f.zip
cpython-fd6cd621e0cce6ba2e737103d2a62b5ade90f41f.tar.gz
cpython-fd6cd621e0cce6ba2e737103d2a62b5ade90f41f.tar.bz2
gh-118934: Fix PyEval_GetLocals docs (PEP 667) (#119932)
PEP 667's description of the planned changes to PyEval_GetLocals was internally inconsistent when accepted, so the docs added for gh-74929 didn't match either the current behaviour or the intended behaviour once gh-118934 is fixed. This PR updates the documentation and 3.13 What's New to match the intended behaviour (once gh-118934 is fixed). It also tidies up lingering references to `f_locals` always being a dictionary (this hasn't been true since at least when custom namespace support for class statement execution was added)
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 134385e..9110060 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -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