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

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

index 0193383a06d1a7a6c8668b5f8ddcf0c5a4221f64..0fdb1397adb740ba3c1d4dae69e5db929335e315 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