]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149861: Fix rule in match statement `case_block` PEG grammar (GH-149908)
authorIvy Xu <fakeshadow1337@gmail.com>
Wed, 27 May 2026 10:25:21 +0000 (18:25 +0800)
committerGitHub <noreply@github.com>
Wed, 27 May 2026 10:25:21 +0000 (12:25 +0200)
Doc/reference/compound_stmts.rst

index a819c41d834aa70940bde221e9e38fc3dbd81b75..63baefd33e88c507b55f2cc121a44691f90727e4 100644 (file)
@@ -620,7 +620,7 @@ The match statement is used for pattern matching.  Syntax:
    match_stmt: 'match' `subject_expr` ":" NEWLINE INDENT `case_block`+ DEDENT
    subject_expr: `flexible_expression` "," [`flexible_expression_list` [',']]
                : | `assignment_expression`
-   case_block: 'case' `patterns` [`guard`] ":" `!block`
+   case_block: 'case' `patterns` [`guard`] ":" `suite`
 
 .. note::
    This section uses single quotes to denote