Skip to content

[docs] Use double quotes over single quotes for match stmt grammar #24943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/reference/compound_stmts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ The match statement is used for pattern matching. Syntax:
match_stmt: 'match' `subject_expr` ":" NEWLINE INDENT `case_block`+ DEDENT
subject_expr: `star_named_expression` "," `star_named_expressions`?
: | `named_expression`
case_block: 'case' `patterns` [`guard`] ':' `block`
case_block: 'case' `patterns` [`guard`] ":" `block`

.. note::
This section uses single quotes to denote
Expand Down Expand Up @@ -861,7 +861,7 @@ emphasize the intended grouping. Otherwise, it has no additional syntax.
Syntax:

.. productionlist:: python-grammar
group_pattern: '(' `pattern` ')'
group_pattern: "(" `pattern` ")"

In simple terms ``(P)`` has the same effect as ``P``.

Expand Down