Skip to content

Commit 9e87880

Browse files
committed
Minor updates for clarity.
1 parent 7f376d7 commit 9e87880

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Doc/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ Glossary
13071307
t-string
13081308
String literals prefixed with ``'t'`` or ``'T'`` are commonly called
13091309
"t-strings" which is short for
1310-
:ref:`template string literals <t-strings>`. See also :pep:`750`.
1310+
:ref:`template string literals <t-strings>`.
13111311

13121312
text encoding
13131313
A string in Python is a sequence of Unicode code points (in range

Doc/reference/lexical_analysis.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,10 @@ the following differences:
938938

939939
- Format specifiers containing nested replacement fields are evaluated eagerly,
940940
prior to being passed to the :class:`~string.templatelib.Interpolation` object.
941+
For instance, an interpolation of the form ``{amount:.{precision}f}`` will
942+
evaluate the expression ``{precision}`` before setting the ``format_spec``
943+
attribute of the resulting :class:`!Interpolation` object; if ``precision``
944+
is (for example) ``2``, the resulting format specifier will be ``'.2f'``.
941945

942946
- When the equal sign ``'='`` is provided in an interpolation expression, the
943947
resulting :class:`~string.templatelib.Template` object will have the expression

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy