Skip to content

gh-141984: Split Parenthesized form docs into "groups" and "tuple displays" - #144964

Closed
encukou wants to merge 4 commits into
python:mainfrom
encukou:expressions-parenthesized
Closed

gh-141984: Split Parenthesized form docs into "groups" and "tuple displays"#144964
encukou wants to merge 4 commits into
python:mainfrom
encukou:expressions-parenthesized

Conversation

@encukou

@encukouencukou commented Feb 18, 2026

Copy link
Copy Markdown
Member

Split up and reword the sections for group (except yield) and tuple rules in python.gram.
As is tradition in these PRs, simple/usual syntax comes first, followed by more complex and obscure cases, finishing up with the formal grammar.
For tuple displays, this meant putting tuples with 2+ elements first, followed by one-element and empty ones. I think the rules are much easier to follow this way.

This also fixes the formal grammar, which previously didn't allow commas in the parentheses.


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

@encukou

Copy link
Copy Markdown
MemberAuthor

Marking this as draft: it might be better to combine the section with the other displays.

@encukou

Copy link
Copy Markdown
MemberAuthor

Superseded by #148622.

@encukouencukou closed this Apr 15, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant

@encukou