@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version : Python 3.14\n "
1414"Report-Msgid-Bugs-To : \n "
15- "POT-Creation-Date : 2025-12-01 14:16 +0000\n "
15+ "POT-Creation-Date : 2025-12-05 14:15 +0000\n "
1616"PO-Revision-Date : 2025-09-16 00:01+0000\n "
1717"Last-Translator : Hengky Kurniawan, 2025\n "
1818"Language-Team : Indonesian (https://app.transifex.com/python-doc/teams/5390/ "
@@ -3148,7 +3148,7 @@ msgid ""
31483148"within f-strings."
31493149msgstr ""
31503150
3151- msgid "Added the debugging operator (``=``)"
3151+ msgid "Added the debug specifier (``=``)"
31523152msgstr ""
31533153
31543154msgid ""
@@ -3159,137 +3159,175 @@ msgstr ""
31593159msgid ""
31603160"An :dfn:`f-string` (formally a :dfn:`formatted string literal`) is a string "
31613161"literal that is prefixed with ``f`` or ``F``. This type of string literal "
3162- "allows embedding arbitrary Python expressions within *replacement fields*, "
3163- "which are delimited by curly brackets (``{}``). These expressions are "
3164- "evaluated at runtime, similarly to :meth:`str.format`, and are converted "
3165- "into regular :class:`str` objects. For example:"
3162+ "allows embedding the results of arbitrary Python expressions within "
3163+ "*replacement fields*, which are delimited by curly brackets (``{}``). Each "
3164+ "replacement field must contain an expression, optionally followed by:"
31663165msgstr ""
31673166
3168- msgid ""
3169- ">>> who = 'nobody'\n"
3170- ">>> nationality = 'Spanish'\n"
3171- ">>> f'{who.title()} expects the {nationality} Inquisition!'\n"
3172- "'Nobody expects the Spanish Inquisition!'"
3167+ msgid "a *debug specifier* -- an equal sign (``=``);"
31733168msgstr ""
31743169
3175- msgid "It is also possible to use a multi line f-string: "
3170+ msgid "a *conversion specifier* -- ``!s``, ``!r`` or ``!a``; and/or "
31763171msgstr ""
31773172
3178- msgid ""
3179- ">>> f'''This is a string\n"
3180- "... on two lines'''\n"
3181- "'This is a string\\ non two lines'"
3173+ msgid "a *format specifier* prefixed with a colon (``:``)."
31823174msgstr ""
31833175
31843176msgid ""
3185- "A single opening curly bracket, ``'{'``, marks a *replacement field* that "
3186- "can contain any Python expression: "
3177+ "See the :ref:`Lexical Analysis section on f-strings <f-strings>` for details "
3178+ "on the syntax of these fields. "
31873179msgstr ""
31883180
3189- msgid ""
3190- ">>> nationality = 'Spanish'\n"
3191- ">>> f'The {nationality} Inquisition!'\n"
3192- "'The Spanish Inquisition!'"
3181+ msgid "Debug specifier"
31933182msgstr ""
31943183
3195- msgid "To include a literal ``{`` or ``}``, use a double bracket:"
3184+ msgid ""
3185+ "If a debug specifier -- an equal sign (``=``) -- appears after the "
3186+ "replacement field expression, the resulting f-string will contain the "
3187+ "expression's source, the equal sign, and the value of the expression. This "
3188+ "is often useful for debugging::"
31963189msgstr ""
31973190
31983191msgid ""
3199- ">>> x = 42 \n"
3200- ">>> f'{{x}} is {x }'\n"
3201- "'{x} is 42 '"
3192+ ">>> number = 14.3 \n"
3193+ ">>> f'{number= }'\n"
3194+ "'number=14.3 '"
32023195msgstr ""
32033196
32043197msgid ""
3205- "Functions can also be used, and :ref:`format specifiers <formatstrings>`:"
3198+ "Whitespace before, inside and after the expression, as well as whitespace "
3199+ "after the equal sign, is significant --- it is retained in the result::"
32063200msgstr ""
32073201
32083202msgid ""
3209- ">>> from math import sqrt\n"
3210- ">>> f'√2 \\ N{ALMOST EQUAL TO} {sqrt(2):.5f}'\n"
3211- "'√2 ≈ 1.41421'"
3203+ ">>> f'{ number - 4 = }'\n"
3204+ "' number - 4 = 10.3'"
32123205msgstr ""
32133206
3214- msgid "Any non-string expression is converted using :func:`str`, by default:"
3207+ msgid "Conversion specifier"
3208+ msgstr ""
3209+
3210+ msgid ""
3211+ "By default, the value of a replacement field expression is converted to a "
3212+ "string using :func:`str`::"
32153213msgstr ""
32163214
32173215msgid ""
32183216">>> from fractions import Fraction\n"
3219- ">>> f'{Fraction(1, 3)}'\n"
3217+ ">>> one_third = Fraction(1, 3)\n"
3218+ ">>> f'{one_third}'\n"
32203219"'1/3'"
32213220msgstr ""
32223221
32233222msgid ""
3224- "To use an explicit conversion, use the ``!`` (exclamation mark) operator, "
3225- "followed by any of the valid formats, which are :"
3223+ "When a debug specifier but no format specifier is used, the default "
3224+ "conversion instead uses :func:`repr`: :"
32263225msgstr ""
32273226
3228- msgid "Conversion"
3227+ msgid ""
3228+ ">>> f'{one_third = }'\n"
3229+ "'one_third = Fraction(1, 3)'"
32293230msgstr ""
32303231
3231- msgid "``!a``"
3232+ msgid ""
3233+ "The conversion can be specified explicitly using one of these specifiers:"
32323234msgstr ""
32333235
3234- msgid ":func:`ascii`"
3235- msgstr ":func:`ascii`"
3236-
3237- msgid "``!r``"
3236+ msgid "``!s`` for :func:`str`"
32383237msgstr ""
32393238
3240- msgid ":func:`repr`"
3241- msgstr ":func:`repr`"
3242-
3243- msgid "``!s``"
3239+ msgid "``!r`` for :func:`repr`"
32443240msgstr ""
32453241
3246- msgid ":func:`str `"
3242+ msgid "``!a`` for :func:`ascii `"
32473243msgstr ""
32483244
32493245msgid ""
3250- ">>> from fractions import Fraction\n"
3251- ">>> f'{Fraction(1, 3)!s}'\n"
3246+ ">>> str(one_third)\n"
32523247"'1/3'\n"
3253- ">>> f'{Fraction(1, 3)!r}' \n"
3248+ ">>> repr(one_third) \n"
32543249"'Fraction(1, 3)'\n"
3255- ">>> question = '¿Dónde está el Presidente?'\n"
3256- ">>> print(f'{question!a}')\n"
3257- "'\\ xbfD\\ xf3nde est\\ xe1 el Presidente?'"
3250+ "\n"
3251+ ">>> f'{one_third!s} is {one_third!r}'\n"
3252+ "'1/3 is Fraction(1, 3)'\n"
3253+ "\n"
3254+ ">>> string = \" ¡kočka 😸!\" \n"
3255+ ">>> ascii(string)\n"
3256+ "\" '\\\\ xa1ko\\\\ u010dka \\\\ U0001f638!'\" \n"
3257+ "\n"
3258+ ">>> f'{string = !a}'\n"
3259+ "\" string = '\\\\ xa1ko\\\\ u010dka \\\\ U0001f638!'\" "
3260+ msgstr ""
3261+
3262+ msgid "Format specifier"
32583263msgstr ""
32593264
32603265msgid ""
3261- "While debugging it may be helpful to see both the expression and its value, "
3262- "by using the equals sign (``=``) after the expression. This preserves spaces "
3263- "within the brackets, and can be used with a converter. By default, the "
3264- "debugging operator uses the :func:`repr` (``!r``) conversion. For example:"
3266+ "After the expression has been evaluated, and possibly converted using an "
3267+ "explicit conversion specifier, it is formatted using the :func:`format` "
3268+ "function. If the replacement field includes a *format specifier* introduced "
3269+ "by a colon (``:``), the specifier is passed to :func:`!format` as the second "
3270+ "argument. The result of :func:`!format` is then used as the final value for "
3271+ "the replacement field. For example::"
32653272msgstr ""
32663273
32673274msgid ""
32683275">>> from fractions import Fraction\n"
3269- ">>> calculation = Fraction(1, 3)\n"
3270- ">>> f'{calculation=}'\n"
3271- "'calculation=Fraction(1, 3)'\n"
3272- ">>> f'{calculation = }'\n"
3273- "'calculation = Fraction(1, 3)'\n"
3274- ">>> f'{calculation = !s}'\n"
3275- "'calculation = 1/3'"
3276+ ">>> one_third = Fraction(1, 3)\n"
3277+ ">>> f'{one_third:.6f}'\n"
3278+ "'0.333333'\n"
3279+ ">>> f'{one_third:_^+10}'\n"
3280+ "'___+1/3___'\n"
3281+ ">>> >>> f'{one_third!r:_^20}'\n"
3282+ "'___Fraction(1, 3)___'\n"
3283+ ">>> f'{one_third = :~>10}~'\n"
3284+ "'one_third = ~~~~~~~1/3~'"
3285+ msgstr ""
3286+
3287+ msgid "Template String Literals (t-strings)"
32763288msgstr ""
32773289
32783290msgid ""
3279- "Once the output has been evaluated, it can be formatted using a :ref:`format "
3280- "specifier <formatstrings>` following a colon (``':'``). After the expression "
3281- "has been evaluated, and possibly converted to a string, the :meth:`!"
3282- "__format__` method of the result is called with the format specifier, or the "
3283- "empty string if no format specifier is given. The formatted result is then "
3284- "used as the final value for the replacement field. For example:"
3291+ "An :dfn:`t-string` (formally a :dfn:`template string literal`) is a string "
3292+ "literal that is prefixed with ``t`` or ``T``."
32853293msgstr ""
32863294
32873295msgid ""
3288- ">>> from fractions import Fraction\n"
3289- ">>> f'{Fraction(1, 7):.6f}'\n"
3290- "'0.142857'\n"
3291- ">>> f'{Fraction(1, 7):_^+10}'\n"
3292- "'___+1/7___'"
3296+ "These strings follow the same syntax and evaluation rules as :ref:`formatted "
3297+ "string literals <stdtypes-fstrings>`, with for the following differences:"
3298+ msgstr ""
3299+
3300+ msgid ""
3301+ "Rather than evaluating to a ``str`` object, template string literals "
3302+ "evaluate to a :class:`string.templatelib.Template` object."
3303+ msgstr ""
3304+
3305+ msgid ""
3306+ "The :func:`format` protocol is not used. Instead, the format specifier and "
3307+ "conversions (if any) are passed to a new :class:`~string.templatelib."
3308+ "Interpolation` object that is created for each evaluated expression. It is "
3309+ "up to code that processes the resulting :class:`~string.templatelib."
3310+ "Template` object to decide how to handle format specifiers and conversions."
3311+ msgstr ""
3312+
3313+ msgid ""
3314+ "Format specifiers containing nested replacement fields are evaluated "
3315+ "eagerly, prior to being passed to the :class:`~string.templatelib."
3316+ "Interpolation` object. For instance, an interpolation of the form ``{amount:."
3317+ "{precision}f}`` will evaluate the inner expression ``{precision}`` to "
3318+ "determine the value of the ``format_spec`` attribute. If ``precision`` were "
3319+ "to be ``2``, the resulting format specifier would be ``'.2f'``."
3320+ msgstr ""
3321+
3322+ msgid ""
3323+ "When the equals sign ``'='`` is provided in an interpolation expression, the "
3324+ "text of the expression is appended to the literal string that precedes the "
3325+ "relevant interpolation. This includes the equals sign and any surrounding "
3326+ "whitespace. The :class:`!Interpolation` instance for the expression will be "
3327+ "created as normal, except that :attr:`~string.templatelib.Interpolation."
3328+ "conversion` will be set to '``r``' (:func:`repr`) by default. If an explicit "
3329+ "conversion or format specifier are provided, this will override the default "
3330+ "behaviour."
32933331msgstr ""
32943332
32953333msgid "``printf``-style String Formatting"
@@ -3429,6 +3467,9 @@ msgstr ""
34293467msgid "The conversion types are:"
34303468msgstr ""
34313469
3470+ msgid "Conversion"
3471+ msgstr ""
3472+
34323473msgid "``'d'``"
34333474msgstr "``'d'``"
34343475
0 commit comments