File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 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>`.
132132   .. versionadded:: 3.11 
133133
134134   .. 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` . 
136136
137137
138138.. c:function:: int PyFrame_GetLineNumber(PyFrameObject *frame)  
139139
140140   Return the line number that *frame * is currently executing. 
141141
142142
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+ :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. 
143163
144164Internal Frames 
145165^^^^^^^^^^^^^^^ 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments