From f6405a46627e1f74c279f712c8776a165b0ba9fd Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 31 Mar 2023 14:40:38 +0200 Subject: [PATCH] Quote literal tokens in standard format specifier grammar (GH-102902) Reported by Damian Dureck: https://mail.python.org/archives/list/docs@python.org/thread/UZTWBJIXC3MBKTHXVTIBPGDPKBNWZ5LN/ --- Doc/library/string.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 3b96813e683..5ada8273281 100644 --- a/Doc/library/string.rst +++ b/Doc/library/string.rst @@ -310,7 +310,7 @@ non-empty format specification typically modifies the result. The general form of a *standard format specifier* is: .. productionlist:: format-spec - format_spec: [[`fill`]`align`][`sign`][z][#][0][`width`][`grouping_option`][.`precision`][`type`] + format_spec: [[`fill`]`align`][`sign`]["z"]["#"]["0"][`width`][`grouping_option`]["." `precision`][`type`] fill: align: "<" | ">" | "=" | "^" sign: "+" | "-" | " "