From: KatherineMichel Date: Tue, 19 Dec 2017 21:03:09 +0000 (-0600) Subject: Improve the F-strings and format specifier documentation (GH-4931) X-Git-Tag: v3.7.0a4~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f4e21a2a72f76d75a6cc6f74faf910a5f3108482;p=python Improve the F-strings and format specifier documentation (GH-4931) Mention that the format-specifier mini language in f-strings is the same one used by str.format. --- diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst index 86e55e4d9c..0f9cb684c6 100644 --- a/Doc/reference/lexical_analysis.rst +++ b/Doc/reference/lexical_analysis.rst @@ -654,10 +654,11 @@ expression or conversion result. An empty string is passed when the format specifier is omitted. The formatted result is then included in the final value of the whole string. -Top-level format specifiers may include nested replacement fields. -These nested fields may include their own conversion fields and -:ref:`format specifiers `, but may not include more -deeply-nested replacement fields. +Top-level format specifiers may include nested replacement fields. These nested +fields may include their own conversion fields and :ref:`format specifiers +`, but may not include more deeply-nested replacement fields. The +:ref:`format specifier mini-language ` is the same as that used by +the string .format() method. Formatted string literals may be concatenated, but replacement fields cannot be split across literals.