Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move one sentence.
  • Loading branch information
davepeck committed Jul 31, 2025
commit 99331f442705ba9b7a6b8c7a4eeccefe7c1d127b
6 changes: 3 additions & 3 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ PEP 750: Template strings
Template strings are a new mechanism for custom string processing. They share
the familiar syntax of f-strings but, unlike f-strings, return a
:class:`~string.templatelib.Template` instance instead of a simple ``str``.
Templates provide access to the static and interpolated (in curly braces) parts
of a string *before* they are combined.

To write a t-string, use a ``'t'`` prefix instead of an ``'f'``:

Expand All @@ -266,7 +264,9 @@ To write a t-string, use a ``'t'`` prefix instead of an ``'f'``:
>>> type(template)
<class 'string.templatelib.Template'>

Iterate over :class:`!Template` instances to access their parts in order:
Templates provide access to the static and interpolated (in curly braces) parts
of a string *before* they are combined. Iterate over :class:`!Template`
instances to access their parts in order:

.. testsetup::

Expand Down
Loading