Skip to content

Commit

Permalink
Quote literal tokens in standard format specifier grammar (GH-102902)
Browse files Browse the repository at this point in the history
Reported by Damian Dureck: https://mail.python.org/archives/list/docs@python.org/thread/UZTWBJIXC3MBKTHXVTIBPGDPKBNWZ5LN/
(cherry picked from commit f6405a4)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
  • Loading branch information
miss-islington and encukou authored Mar 31, 2023
1 parent 41e3ea1 commit 4664a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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: "+" | "-" | " "
Expand Down

0 comments on commit 4664a7c

Please sign in to comment.