77msgstr ""
88"Project-Id-Version : Python 3.14\n "
99"Report-Msgid-Bugs-To : \n "
10- "POT-Creation-Date : 2025-09-08 15:25+0800 \n "
10+ "POT-Creation-Date : 2025-10-06 00:15+0000 \n "
1111"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1212"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
1313"Language-Team : LANGUAGE <LL@li.org>\n "
@@ -43,9 +43,9 @@ msgstr "模板字串"
4343#: ../../library/string.templatelib.rst:24
4444msgid ""
4545"Template strings are a mechanism for custom string processing. They have the "
46- "full flexibility of Python's :ref:`f-strings`, but return "
47- "a :class: `Template` instance that gives access to the static and "
48- "interpolated (in curly braces ) parts of a string *before* they are combined."
46+ "full flexibility of Python's :ref:`f-strings`, but return a :class: "
47+ "`Template` instance that gives access to the static and interpolated (in "
48+ "curly brackets ) parts of a string *before* they are combined."
4949msgstr ""
5050
5151#: ../../library/string.templatelib.rst:30
@@ -81,10 +81,10 @@ msgstr ""
8181
8282#: ../../library/string.templatelib.rst:49
8383msgid ""
84- "The most common way to create a :class:`!Template` instance is to use "
85- "the : ref:`template string literal syntax <t-strings>`. This syntax is "
86- "identical to that of :ref:`f-strings <f-strings>`, except that it uses a "
87- "``t`` prefix in place of an ``f``:"
84+ "The most common way to create a :class:`!Template` instance is to use the : "
85+ "ref:`template string literal syntax <t-strings>`. This syntax is identical "
86+ "to that of :ref:`f-strings <f-strings>`, except that it uses a ``t`` prefix "
87+ "in place of an ``f``:"
8888msgstr ""
8989
9090#: ../../library/string.templatelib.rst:59
@@ -145,12 +145,12 @@ msgstr ""
145145#: ../../library/string.templatelib.rst:139
146146msgid ""
147147"The ``values`` tuple always has the same length as the ``interpolations`` "
148- "tuple. It is always equivalent to ``tuple(i.value for i in "
149- "template. interpolations)``."
148+ "tuple. It is always equivalent to ``tuple(i.value for i in template. "
149+ "interpolations)``."
150150msgstr ""
151151
152152#: ../../library/string.templatelib.rst:144
153- #: ../../library/string.templatelib.rst:314
153+ #: ../../library/string.templatelib.rst:317
154154msgid "Methods"
155155msgstr "方法"
156156
@@ -177,8 +177,8 @@ msgstr ""
177177
178178#: ../../library/string.templatelib.rst:182
179179msgid ""
180- "Iterate over the template, yielding each non-empty string "
181- "and :class: `Interpolation` in the correct order:"
180+ "Iterate over the template, yielding each non-empty string and :class: "
181+ "`Interpolation` in the correct order:"
182182msgstr ""
183183
184184#: ../../library/string.templatelib.rst:191
@@ -219,28 +219,32 @@ msgid "The evaluated value of the interpolation."
219219msgstr ""
220220
221221#: ../../library/string.templatelib.rst:261
222- #: ../../library/string.templatelib.rst:323
223- msgid "The text of a valid Python expression, or an empty string."
222+ msgid ""
223+ "For interpolations created by t-string literals, :attr:`!expression` is the "
224+ "expression text found inside the curly brackets (``{`` & ``}``), including "
225+ "any whitespace, excluding the curly brackets themselves, and ending before "
226+ "the first ``!``, ``:``, or ``=`` if any is present. For manually created "
227+ "interpolations, :attr:`!expression` is the arbitrary string provided when "
228+ "constructing the interpolation instance."
224229msgstr ""
225230
226- #: ../../library/string.templatelib.rst:263
231+ #: ../../library/string.templatelib.rst:268
227232msgid ""
228- "The :attr:`.expression` is the original text of the interpolation's Python "
229- "expression, if the interpolation was created from a t-string literal. "
230- "Developers creating interpolations manually should either set this to an "
231- "empty string or choose a suitable valid Python expression."
233+ "We recommend using valid Python expressions or the empty string for the "
234+ "``expression`` field of manually created :class:`!Interpolation` instances, "
235+ "although this is not enforced at runtime."
232236msgstr ""
233237
234- #: ../../library/string.templatelib.rst:275
238+ #: ../../library/string.templatelib.rst:278
235239msgid "The conversion to apply to the value, or ``None``."
236240msgstr ""
237241
238- #: ../../library/string.templatelib.rst:277
242+ #: ../../library/string.templatelib.rst:280
239243msgid ""
240244"The :attr:`!conversion` is the optional conversion to apply to the value:"
241245msgstr ""
242246
243- #: ../../library/string.templatelib.rst:285
247+ #: ../../library/string.templatelib.rst:288
244248msgid ""
245249"Unlike f-strings, where conversions are applied automatically, the expected "
246250"behavior with t-strings is that code that *processes* the :class:`!Template` "
@@ -249,17 +253,17 @@ msgid ""
249253"conversion semantics."
250254msgstr ""
251255
252- #: ../../library/string.templatelib.rst:295
256+ #: ../../library/string.templatelib.rst:298
253257msgid "The format specification to apply to the value."
254258msgstr ""
255259
256- #: ../../library/string.templatelib.rst:297
260+ #: ../../library/string.templatelib.rst:300
257261msgid ""
258262"The :attr:`!format_spec` is an optional, arbitrary string used as the format "
259263"specification to present the value:"
260264msgstr ""
261265
262- #: ../../library/string.templatelib.rst:305
266+ #: ../../library/string.templatelib.rst:308
263267msgid ""
264268"Unlike f-strings, where format specifications are applied automatically via "
265269"the :func:`format` protocol, the expected behavior with t-strings is that "
@@ -269,57 +273,61 @@ msgid ""
269273"not conform to the :func:`format` protocol."
270274msgstr ""
271275
272- #: ../../library/string.templatelib.rst:320
276+ #: ../../library/string.templatelib.rst:323
273277msgid "Create a new :class:`!Interpolation` object from component parts."
274278msgstr ""
275279
276280#: ../../library/string.templatelib.rst:0
277281msgid "Parameters"
278282msgstr ""
279283
280- #: ../../library/string.templatelib.rst:322
284+ #: ../../library/string.templatelib.rst:325
281285msgid "The evaluated, in-scope result of the interpolation."
282286msgstr ""
283287
284- #: ../../library/string.templatelib.rst:325
288+ #: ../../library/string.templatelib.rst:326
289+ msgid "The text of a valid Python expression, or an empty string."
290+ msgstr ""
291+
292+ #: ../../library/string.templatelib.rst:328
285293msgid ""
286294"The :ref:`conversion <formatstrings>` to be used, one of ``None``, ``'a'``, "
287295"``'r'``, or ``'s'``."
288296msgstr ""
289297
290- #: ../../library/string.templatelib.rst:327
298+ #: ../../library/string.templatelib.rst:330
291299msgid ""
292300"An optional, arbitrary string used as the :ref:`format specification "
293301"<formatspec>` to present the value."
294302msgstr ""
295303
296- #: ../../library/string.templatelib.rst:332
304+ #: ../../library/string.templatelib.rst:335
297305msgid "Helper functions"
298306msgstr ""
299307
300- #: ../../library/string.templatelib.rst:336
308+ #: ../../library/string.templatelib.rst:339
301309msgid ""
302310"Applies formatted string literal :ref:`conversion <formatstrings-"
303311"conversion>` semantics to the given object *obj*. This is frequently useful "
304312"for custom template string processing logic."
305313msgstr ""
306314
307- #: ../../library/string.templatelib.rst:340
315+ #: ../../library/string.templatelib.rst:343
308316msgid "Three conversion flags are currently supported:"
309317msgstr ""
310318
311- #: ../../library/string.templatelib.rst:342
319+ #: ../../library/string.templatelib.rst:345
312320msgid "``'s'`` which calls :func:`str` on the value (like ``!s``),"
313321msgstr ""
314322
315- #: ../../library/string.templatelib.rst:343
323+ #: ../../library/string.templatelib.rst:346
316324msgid "``'r'`` which calls :func:`repr` (like ``!r``), and"
317325msgstr ""
318326
319- #: ../../library/string.templatelib.rst:344
327+ #: ../../library/string.templatelib.rst:347
320328msgid "``'a'`` which calls :func:`ascii` (like ``!a``)."
321329msgstr ""
322330
323- #: ../../library/string.templatelib.rst:346
331+ #: ../../library/string.templatelib.rst:349
324332msgid "If the conversion flag is ``None``, *obj* is returned unchanged."
325333msgstr ""
0 commit comments