Quote literal tokens in standard format specifier grammar (GH-102902)
![](https://secure.gravatar.com/avatar/cc7737cd64a84f1b5c61a160798e97ee.jpg?s=120&d=mm&r=g)
https://github.com/python/cpython/commit/4664a7cf689946f0c9854cadee7c6aa9c27... commit: 4664a7cf689946f0c9854cadee7c6aa9c276a8cf branch: 3.11 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: miss-islington <31488909+miss-islington@users.noreply.github.com> date: 2023-03-31T05:52:52-07:00 summary: Quote literal tokens in standard format specifier grammar (GH-102902) Reported by Damian Dureck: https://mail.python.org/archives/list/docs@python.org/thread/UZTWBJIXC3MBKTH... (cherry picked from commit f6405a46627e1f74c279f712c8776a165b0ba9fd) Co-authored-by: Petr Viktorin <encukou@gmail.com> files: M Doc/library/string.rst 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: <any character> align: "<" | ">" | "=" | "^" sign: "+" | "-" | " "
participants (1)
-
miss-islington