]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-141984: Reword docs on "enclosed" atom grammar (GH-148622)
authorPetr Viktorin <encukou@gmail.com>
Wed, 27 May 2026 12:32:33 +0000 (14:32 +0200)
committerGitHub <noreply@github.com>
Wed, 27 May 2026 12:32:33 +0000 (14:32 +0200)
commit55f25183263b9a52fa246817344cdb32d6c3d722
treea38162ccd02e360170558371f2bcee83cc10223d
parent638754cb8579a4f7acfd465c885f783c073c0baf
gh-141984: Reword docs on "enclosed" atom grammar (GH-148622)

Reorganize and reword the docs on atoms in parentheses, brackets and braces:
parenthesized groups, list/set/dict/tuple displays, and comprehensions.
(Generator expressions and yield atoms are left for later.)

In the spirit of better matching the underlying grammar, *comprehensions* are
covered separately from non-comprehension displays. Also, parenthesized forms
(with a single expression) and tuple displays are separated.
All sections are rewritten to start with simple cases and build up to the full
formal grammar.

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Doc/reference/expressions.rst
Doc/tools/removed-ids.txt