]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
ast docs: Fix description of ast.Constant (#134741)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Fri, 30 May 2025 04:11:20 +0000 (21:11 -0700)
committerGitHub <noreply@github.com>
Fri, 30 May 2025 04:11:20 +0000 (21:11 -0700)
commit381020d41fb1f8b33421f01c609ba0d0edb99764
tree7918394705220b155a5782833d31f9e00503c9ad
parenta4251411a97304ab001721c6231d86ddf4eac3f0
ast docs: Fix description of ast.Constant (#134741)

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.
Doc/library/ast.rst