]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] ast docs: Fix description of ast.Constant (GH-134741) (#134912)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 30 May 2025 04:19:04 +0000 (06:19 +0200)
committerGitHub <noreply@github.com>
Fri, 30 May 2025 04:19:04 +0000 (04:19 +0000)
commitf4b8cd5510c72ca78c3f2f02a1e12f7827377ed0
tree19a180a121f10a70336aaceac37110317401b9c9
parenta9ba2ecae53e9341a6303d51ccf6b7f0b8160f50
[3.13] ast docs: Fix description of ast.Constant (GH-134741) (#134912)

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