]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Quote literal tokens in standard format specifier grammar (GH-102902)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 31 Mar 2023 12:52:52 +0000 (05:52 -0700)
committerGitHub <noreply@github.com>
Fri, 31 Mar 2023 12:52:52 +0000 (05:52 -0700)
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 <encukou@gmail.com>
Doc/library/string.rst

index 3b96813e683864e7ca237e85a10d591914804355..5ada827328188dfa097df04aff4b43a5ffa54c78 100644 (file)
@@ -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: <any character>
    align: "<" | ">" | "=" | "^"
    sign: "+" | "-" | " "