Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ast docs: Fix description of ast.Constant #134741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented May 26, 2025

Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.


📚 Documentation preview 📚: https://cpython-previews--134741.org.readthedocs.build/

Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
@JelleZijlstra JelleZijlstra merged commit 381020d into python:main May 30, 2025
37 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs May 30, 2025
@miss-islington-app
Copy link

Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 30, 2025
Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d)

Co-authored-by: Jelle Zijlstra <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented May 30, 2025

GH-134911 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 30, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 30, 2025
Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d)

Co-authored-by: Jelle Zijlstra <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented May 30, 2025

GH-134912 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 30, 2025
JelleZijlstra added a commit that referenced this pull request May 30, 2025
Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d)

Co-authored-by: Jelle Zijlstra <[email protected]>
JelleZijlstra added a commit that referenced this pull request May 30, 2025
Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d)

Co-authored-by: Jelle Zijlstra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants