Skip to content

gh-122826: Document exec closure name resolution - #155014

Open
kn1g78 wants to merge 1 commit into
python:mainfrom
kn1g78:gh-122826-exec-closure-docs
Open

gh-122826: Document exec closure name resolution#155014
kn1g78 wants to merge 1 commit into
python:mainfrom
kn1g78:gh-122826-exec-closure-docs

Conversation

@kn1g78

@kn1g78 kn1g78 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #122826.

The execution model documentation previously described name resolution for eval() and exec() without distinguishing string source from code objects. This change limits the existing explanation to string source and documents that exec() can explicitly receive closure cells for a code object containing free variables.

Checks:

  • Doc\make.bat check
  • Doc\make.bat html reference/executionmodel.rst with warnings treated as errors

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33863459 | 📁 Comparing 0248024 against main (a646c99)

  🔍 Preview build  

1 file changed
± reference/executionmodel.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Execution model reference should cover closure arg to exec & eval

1 participant