gh-74929: PEP 667 general docs update (gh-119201)

* expand on What's New entry for PEP 667 (including porting notes)
* define 'optimized scope' as a glossary term
* cover comprehensions and generator expressions in locals() docs
* review all mentions of "locals" in documentation (updating if needed)
* review all mentions of "f_locals" in documentation (updating if needed)
This commit is contained in:
Alyssa Coghlan 2024-05-21 13:32:15 +10:00 committed by GitHub
parent 538ed5e481
commit e870c852c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 162 additions and 65 deletions

View file

@ -1349,7 +1349,7 @@ Special read-only attributes
* - .. attribute:: frame.f_locals
- The dictionary used by the frame to look up
:ref:`local variables <naming>`.
If the frame refers to a function or comprehension,
If the frame refers to an :term:`optimized scope`,
this may return a write-through proxy object.
.. versionchanged:: 3.13