summaryrefslogtreecommitdiffstats
path: root/Doc/library/string.rst
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2023-03-31 12:40:38 (GMT)
committerGitHub <noreply@github.com>2023-03-31 12:40:38 (GMT)
commitf6405a46627e1f74c279f712c8776a165b0ba9fd (patch)
tree1e152bd8dfc6ee8f14043349541eea322631fbbd /Doc/library/string.rst
parent20c0f196ff63546a6a0460a46c92de12b975bc1a (diff)
downloadcpython-f6405a46627e1f74c279f712c8776a165b0ba9fd.zip
cpython-f6405a46627e1f74c279f712c8776a165b0ba9fd.tar.gz
cpython-f6405a46627e1f74c279f712c8776a165b0ba9fd.tar.bz2
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/
Diffstat (limited to 'Doc/library/string.rst')
-rw-r--r--Doc/library/string.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 3b96813..5ada827 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: <any character>
align: "<" | ">" | "=" | "^"
sign: "+" | "-" | " "