mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
bpo-31907: [doc] clarify that str.format() does not support arbitrary expressions (#25053)
This commit is contained in:
parent
af50c84643
commit
fb1d01b963
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue