-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Document FrameLocalsProxy behaviour quirks #125731
Copy link
Copy link
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
Projects
Status
Todo
Following PEP 667, https://docs.python.org/dev/reference/datamodel.html#frame-objects mentions that
frame.f_localsmay be a write-through proxy object, but doesn't really explain what that means.Once python/peps#3845 lands PEP 667 will contain such a description, but the main docs should at least cover the key behaviours:
.copy()(and any other API that produces a new container) returns a regulardictinstanceSuggested location would be as a new 4th subsection under the frame objects section linked above. A "see also" from that new subsection back to PEP 667 would also be a useful addition.