From aa81256eba2f282da1da00e27b3405e4c7c1c59b Mon Sep 17 00:00:00 2001 From: CBJ Date: Sun, 1 Sep 2024 15:31:17 -0400 Subject: [PATCH 1/2] Fix `signed_number` token in documentation --- 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 8181b9759517f6..e925e24f864280 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -841,7 +841,7 @@ A literal pattern corresponds to most : | "None" : | "True" : | "False" - : | `signed_number`: NUMBER | "-" NUMBER + signed_number: NUMBER | "-" NUMBER The rule ``strings`` and the token ``NUMBER`` are defined in the :doc:`standard Python grammar <./grammar>`. Triple-quoted strings are From fc0239200c57902e35132f1f1a7fcc83e34ddbdc Mon Sep 17 00:00:00 2001 From: CBerJun <121291537+CBerJun@users.noreply.github.com> Date: Mon, 2 Sep 2024 00:59:16 -0400 Subject: [PATCH 2/2] Cleaner `signed_number` token definition Co-authored-by: Sergey B Kirpichev --- 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 e925e24f864280..46ee3a174f3d0f 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -841,7 +841,7 @@ A literal pattern corresponds to most : | "None" : | "True" : | "False" - signed_number: NUMBER | "-" NUMBER + signed_number: ["-"] NUMBER The rule ``strings`` and the token ``NUMBER`` are defined in the :doc:`standard Python grammar <./grammar>`. Triple-quoted strings are