]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] 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:24:47 +0000 (17:24 +0200)
committerGitHub <noreply@github.com>
Wed, 27 May 2026 15:24:47 +0000 (16:24 +0100)
(cherry picked from commit 99c254e2f79a4197524bef61bf0d12251ee273e6)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
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