]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] ast docs: Fix description of ast.Constant (GH-134741) (#134911)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 30 May 2025 04:17:18 +0000 (06:17 +0200)
committerGitHub <noreply@github.com>
Fri, 30 May 2025 04:17:18 +0000 (04:17 +0000)
commit4927596c499cf5b4437fbf30d782ce87f90572c1
tree8955232e2c1b515e77283529f2117fd294f0849c
parent9c2e0febb481f1c24a6397d3a4fb9422c9433ef4
[3.14] ast docs: Fix description of ast.Constant (GH-134741) (#134911)

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 381020d41fb1f8b33421f01c609ba0d0edb99764)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Doc/library/ast.rst