]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-149861: Fix rule in match statement `case_block` PEG grammar (#150512)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 27 May 2026 15:25:43 +0000 (17:25 +0200)
committerGitHub <noreply@github.com>
Wed, 27 May 2026 15:25:43 +0000 (16:25 +0100)
(cherry picked from commit 99c254e2f79a4197524bef61bf0d12251ee273e6)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
Doc/reference/compound_stmts.rst

index 303c201f1a6feb29bb2d77e996682db33515cdfc..704e6d0144f9a5ee0a64702bcb51689719a3cceb 100644 (file)
@@ -613,7 +613,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