From f8660a12a09b8db32437abbfc58c1d35ced0b64e Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 13 Sep 2025 23:07:38 +0300 Subject: [PATCH 1/2] Make sure `:keyword:` role works for `case` --- Doc/reference/compound_stmts.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 283b3b1bc6d86e..20bd429f197036 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -590,6 +590,7 @@ the items are surrounded by parentheses. For example:: statement. .. _match: +.. _case: The :keyword:`!match` statement =============================== @@ -618,7 +619,7 @@ The match statement is used for pattern matching. Syntax: This section uses single quotes to denote :ref:`soft keywords `. -Pattern matching takes a pattern as input (following ``case``) and a subject +Pattern matching takes a pattern as input (following :keyword:`case`) and a subject value (following ``match``). The pattern (which may contain subpatterns) is matched against the subject value. The outcomes are: From d2ff2c26cccc4354b8b1dfc27149d3f7322353b6 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 13 Sep 2025 23:21:28 +0300 Subject: [PATCH 2/2] Revert test change --- Doc/reference/compound_stmts.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 20bd429f197036..c679c2f4806fc4 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -619,7 +619,7 @@ The match statement is used for pattern matching. Syntax: This section uses single quotes to denote :ref:`soft keywords `. -Pattern matching takes a pattern as input (following :keyword:`case`) and a subject +Pattern matching takes a pattern as input (following ``case``) and a subject value (following ``match``). The pattern (which may contain subpatterns) is matched against the subject value. The outcomes are: