summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrit Katriel <iritkatriel@yahoo.com>2021-03-28 20:47:20 (GMT)
committerGitHub <noreply@github.com>2021-03-28 20:47:20 (GMT)
commitfb1d01b9630b5069fe975f16e07a027d90b89434 (patch)
tree3b287a5a6a5d88d8069974d84b9355c72ab2a5f4
parentaf50c84643ce21cfbdfdabbdfae6bd5e1368c542 (diff)
downloadcpython-fb1d01b9630b5069fe975f16e07a027d90b89434.zip
cpython-fb1d01b9630b5069fe975f16e07a027d90b89434.tar.gz
cpython-fb1d01b9630b5069fe975f16e07a027d90b89434.tar.bz2
bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (#25053)
-rw-r--r--Doc/library/string.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 1bfd518..d935419 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -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