File tree 1 file changed +21
-1
lines changed
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -132,14 +132,34 @@ See also :ref:`Reflection <reflection>`.
132
132
.. versionadded:: 3.11
133
133
134
134
.. versionchanged:: 3.13
135
- As part of :pep:`667`, return a proxy object for optimized scopes .
135
+ As part of :pep:`667`, return an instance of :c:var:`PyFrameLocalsProxy_Type` .
136
136
137
137
138
138
.. c:function:: int PyFrame_GetLineNumber(PyFrameObject *frame)
139
139
140
140
Return the line number that *frame * is currently executing.
141
141
142
142
143
+ Frame Locals Proxies
144
+ ^^^^^^^^^^^^^^^^^^^^
145
+
146
+ .. versionadded :: 3.13
147
+
148
+ The :attr: `~frame.f_locals ` attribute on a :ref: `frame object <frame-objects >`
149
+ is an instance of a "frame-locals proxy". The proxy object exposes a
150
+ write-through view of the underlying locals dictionary for the frame. This
151
+ ensures that the variables exposed by ``f_locals `` are always up to date with
152
+ the live local variables in the frame itself.
153
+
154
+ See :pep: `667 ` for more information.
155
+
156
+ .. c :var :: PyTypeObject PyFrameLocalsProxy_Type
157
+
158
+ The type of frame :func: `locals ` proxy objects.
159
+
160
+ .. c :function :: int PyFrameLocalsProxy_Check (PyObject *obj)
161
+
162
+ Return non-zero if *obj * is a frame :func: `locals ` proxy.
143
163
144
164
Internal Frames
145
165
^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments