From: Petr Viktorin Date: Fri, 31 Mar 2023 12:40:38 +0000 (+0200) Subject: Quote literal tokens in standard format specifier grammar (GH-102902) X-Git-Tag: v3.12.0a7~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6405a46627e1f74c279f712c8776a165b0ba9fd;p=thirdparty%2FPython%2Fcpython.git 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/ --- diff --git a/Doc/library/string.rst b/Doc/library/string.rst index 3b96813e6838..5ada82732818 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: "+" | "-" | " "