bpo-31907: [doc] clarify that str.format() does not support arbitrary… · python/cpython@fb1d01b

Original file line numberDiff line numberDiff line change

@@ -188,8 +188,8 @@ Format String Syntax

188188

The :meth:`str.format` method and the :class:`Formatter` class share the same

189189

syntax for format strings (although in the case of :class:`Formatter`,

190190

subclasses can define their own format string syntax). The syntax is

191-

related to that of :ref:`formatted string literals <f-strings>`, but

192-

there are differences.

191+

related to that of :ref:`formatted string literals <f-strings>`, but it is

192+

less sophisticated and, in particular, does not support arbitrary expressions.

193193
194194

.. index::

195195

single: {} (curly brackets); in string formatting