]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use double quotes over single quotes for match statement grammar (GH-24943)
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Mon, 12 Apr 2021 17:03:20 +0000 (01:03 +0800)
committerGitHub <noreply@github.com>
Mon, 12 Apr 2021 17:03:20 +0000 (10:03 -0700)
Doc/reference/compound_stmts.rst

index 2da90682a1f9bd498b157705671259816a04fc15..8e680812706841046d704c51cab393a0be8c3087 100644 (file)
@@ -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
@@ -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``.