]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions...
authorIrit Katriel <iritkatriel@yahoo.com>
Sun, 28 Mar 2021 20:47:20 +0000 (21:47 +0100)
committerGitHub <noreply@github.com>
Sun, 28 Mar 2021 20:47:20 +0000 (16:47 -0400)
Doc/library/string.rst

index 1bfd518349b3893b8bd394f51c7dc4c637256ed2..d935419f7b75e769fbef87d07a3a46c24da3699d 100644 (file)
@@ -188,8 +188,8 @@ Format String Syntax
 The :meth:`str.format` method and the :class:`Formatter` class share the same
 syntax for format strings (although in the case of :class:`Formatter`,
 subclasses can define their own format string syntax).  The syntax is
-related to that of :ref:`formatted string literals <f-strings>`, but
-there are differences.
+related to that of :ref:`formatted string literals <f-strings>`, but it is
+less sophisticated and, in particular, does not support arbitrary expressions.
 
 .. index::
    single: {} (curly brackets); in string formatting