bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (#25053)

This commit is contained in:
Irit Katriel 2021-03-28 21:47:20 +01:00 committed by GitHub
parent af50c84643
commit fb1d01b963
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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