From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 31 Mar 2023 12:52:52 +0000 (-0700) Subject: Quote literal tokens in standard format specifier grammar (GH-102902) X-Git-Tag: v3.11.3~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4664a7cf689946f0c9854cadee7c6aa9c276a8cf;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/ (cherry picked from commit f6405a46627e1f74c279f712c8776a165b0ba9fd) Co-authored-by: Petr Viktorin --- 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: "+" | "-" | " "