@@ -13,7 +13,7 @@ msgid ""
1313msgstr ""
1414"Project-Id-Version : Python 3.14\n "
1515"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2026-03-27 14:44 +0000\n "
16+ "POT-Creation-Date : 2026-04-09 15:16 +0000\n "
1717"PO-Revision-Date : 2025-09-16 00:00+0000\n "
1818"Last-Translator : Freesand Leo <yuqinju@163.com>, 2026\n "
1919"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -2498,8 +2498,8 @@ msgstr "将单个 Unicode 字符 *ch* 写入 *writer*。"
24982498#: ../../c-api/unicode.rst:1817 ../../c-api/unicode.rst:1827
24992499#: ../../c-api/unicode.rst:1842 ../../c-api/unicode.rst:1852
25002500#: ../../c-api/unicode.rst:1861 ../../c-api/unicode.rst:1868
2501- #: ../../c-api/unicode.rst:1877 ../../c-api/unicode.rst:1892
2502- #: ../../c-api/unicode.rst:1899 ../../c-api/unicode.rst:1918
2501+ #: ../../c-api/unicode.rst:1881 ../../c-api/unicode.rst:1896
2502+ #: ../../c-api/unicode.rst:1903 ../../c-api/unicode.rst:1922
25032503msgid ""
25042504"On success, return ``0``. On error, set an exception, leave the writer "
25052505"unchanged, and return ``-1``."
@@ -2512,7 +2512,7 @@ msgid ""
25122512msgstr "以严格模式将字符串 *str* 从 UTF-8 解码,并将输出写入 *writer*。"
25132513
25142514#: ../../c-api/unicode.rst:1824 ../../c-api/unicode.rst:1836
2515- #: ../../c-api/unicode.rst:1907
2515+ #: ../../c-api/unicode.rst:1911
25162516msgid ""
25172517"*size* is the string length in bytes. If *size* is equal to ``-1``, call "
25182518"``strlen(str)`` to get the string length."
@@ -2555,24 +2555,33 @@ msgid ""
25552555"Call :c:func:`PyObject_Str` on *obj* and write the output into *writer*."
25562556msgstr "对 *obj* 调用 :c:func:`PyObject_Str` 并将输出写入 *writer*。"
25572557
2558- #: ../../c-api/unicode.rst:1873
2558+ #: ../../c-api/unicode.rst:1871
2559+ msgid ""
2560+ "To write a :class:`str` subclass which overrides the :meth:`~object.__str__`"
2561+ " method, :c:func:`PyUnicode_FromObject` can be used to get the original "
2562+ "string."
2563+ msgstr ""
2564+ "要编写一个重写 :meth:`~object.__str__` 方法的 :class:`str` 子类,可以使用 "
2565+ ":c:func:`PyUnicode_FromObject` 来获取原字符串。"
2566+
2567+ #: ../../c-api/unicode.rst:1877
25592568msgid ""
25602569"Call :c:func:`PyObject_Repr` on *obj* and write the output into *writer*."
25612570msgstr "对 *obj* 调用 :c:func:`PyObject_Repr` 并将输出写入 *writer*。"
25622571
2563- #: ../../c-api/unicode.rst:1875
2572+ #: ../../c-api/unicode.rst:1879
25642573msgid "If *obj* is ``NULL``, write the string ``\" <NULL>\" `` into *writer*."
25652574msgstr "如果 *obj* 为 ``NULL``,则将字符串 ``\" <NULL>\" `` 写入 *writer*。"
25662575
2567- #: ../../c-api/unicode.rst:1882
2576+ #: ../../c-api/unicode.rst:1886
25682577msgid "Added support for ``NULL``."
25692578msgstr "增加了对 ``NULL`` 的支持。"
25702579
2571- #: ../../c-api/unicode.rst:1886
2580+ #: ../../c-api/unicode.rst:1890
25722581msgid "Write the substring ``str[start:end]`` into *writer*."
25732582msgstr "将子字符串 ``str[start:end]`` 写入 *writer*。"
25742583
2575- #: ../../c-api/unicode.rst:1888
2584+ #: ../../c-api/unicode.rst:1892
25762585msgid ""
25772586"*str* must be Python :class:`str` object. *start* must be greater than or "
25782587"equal to 0, and less than or equal to *end*. *end* must be less than or "
@@ -2581,27 +2590,27 @@ msgstr ""
25812590"*str* 必须是 Python :class:`str` 对象。*start* 需大于等于 0 且小于等于 *end*,而 *end* 不得超过 "
25822591"*str* 的长度。"
25832592
2584- #: ../../c-api/unicode.rst:1897
2593+ #: ../../c-api/unicode.rst:1901
25852594msgid ""
25862595"Similar to :c:func:`PyUnicode_FromFormat`, but write the output directly "
25872596"into *writer*."
25882597msgstr "功能类似 :c:func:`PyUnicode_FromFormat`,但直接将输出写入 *writer*。"
25892598
2590- #: ../../c-api/unicode.rst:1904
2599+ #: ../../c-api/unicode.rst:1908
25912600msgid ""
25922601"Decode the string *str* from UTF-8 with *errors* error handler and write the"
25932602" output into *writer*."
25942603msgstr "使用 *errors* 错误处理程序将字符串 *str* 从 UTF-8 解码,并将输出写入 *writer*。"
25952604
2596- #: ../../c-api/unicode.rst:1910
2605+ #: ../../c-api/unicode.rst:1914
25972606msgid ""
25982607"*errors* is an :ref:`error handler <error-handlers>` name, such as "
25992608"``\" replace\" ``. If *errors* is ``NULL``, use the strict error handler."
26002609msgstr ""
26012610"*errors* 为 :ref:`错误处理程序 <error-handlers>` 名称(例如 ``\" replace\" ``)。若 *errors* "
26022611"为 ``NULL``,则使用严格错误处理程序。"
26032612
2604- #: ../../c-api/unicode.rst:1913
2613+ #: ../../c-api/unicode.rst:1917
26052614msgid ""
26062615"If *consumed* is not ``NULL``, set *\\ *consumed* to the number of decoded "
26072616"bytes on success. If *consumed* is ``NULL``, treat trailing incomplete UTF-8"
@@ -2610,19 +2619,19 @@ msgstr ""
26102619"若 *consumed* 不为 ``NULL``,则在成功时将 *\\ *consumed* 设为已解码的字节数;若为 ``NULL``,则将末尾不完整的"
26112620" UTF-8 字节序列视为错误。"
26122621
2613- #: ../../c-api/unicode.rst:1921
2622+ #: ../../c-api/unicode.rst:1925
26142623msgid "See also :c:func:`PyUnicodeWriter_WriteUTF8`."
26152624msgstr "另请参阅 :c:func:`PyUnicodeWriter_WriteUTF8`。"
26162625
2617- #: ../../c-api/unicode.rst:1924
2626+ #: ../../c-api/unicode.rst:1928
26182627msgid "Deprecated API"
26192628msgstr "已弃用的 API"
26202629
2621- #: ../../c-api/unicode.rst:1926
2630+ #: ../../c-api/unicode.rst:1930
26222631msgid "The following API is deprecated."
26232632msgstr "以下 API 已被弃用。"
26242633
2625- #: ../../c-api/unicode.rst:1930
2634+ #: ../../c-api/unicode.rst:1934
26262635msgid ""
26272636"This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit "
26282637"type depending on the platform. Please use :c:type:`wchar_t` directly "
@@ -2631,20 +2640,20 @@ msgstr ""
26312640"此类型为 :c:type:`wchar_t` 的别名,其实际为 16 位或 32 位类型(取决于平台)。请直接使用 :c:type:`wchar_t` "
26322641"类型。"
26332642
2634- #: ../../c-api/unicode.rst:1934
2643+ #: ../../c-api/unicode.rst:1938
26352644msgid ""
26362645"In previous versions, this was a 16-bit type or a 32-bit type depending on "
26372646"whether you selected a \" narrow\" or \" wide\" Unicode version of Python at "
26382647"build time."
26392648msgstr "在以前的版本中,这是 16 位类型还是 32 位类型,这取决于您在构建时选择的是“窄”还是“宽”Unicode 版本的 Python。"
26402649
2641- #: ../../c-api/unicode.rst:1944
2650+ #: ../../c-api/unicode.rst:1948
26422651msgid ""
26432652"Do nothing and return ``0``. This API is kept only for backward "
26442653"compatibility, but there are no plans to remove it."
26452654msgstr "不做任何事并返回 ``0``。此 API 仅为向下兼容而保留,但还没有移除它的计划。"
26462655
2647- #: ../../c-api/unicode.rst:1950
2656+ #: ../../c-api/unicode.rst:1954
26482657msgid ""
26492658"This API does nothing since Python 3.12. Previously, this needed to be "
26502659"called for each string created using the old API "
@@ -2653,13 +2662,13 @@ msgstr ""
26532662"该 API 自 Python 3.12 起已成为空操作。此前版本中,使用旧 API(如 :c:func:`!PyUnicode_FromUnicode`"
26542663" 等)创建字符串时需调用此接口。"
26552664
2656- #: ../../c-api/unicode.rst:1958
2665+ #: ../../c-api/unicode.rst:1962
26572666msgid ""
26582667"Do nothing and return ``1``. This API is kept only for backward "
26592668"compatibility, but there are no plans to remove it."
26602669msgstr "不做任何事并返回 ``1``。此 API 仅为向下兼容而保留,但还没有移除它的计划。"
26612670
2662- #: ../../c-api/unicode.rst:1964
2671+ #: ../../c-api/unicode.rst:1968
26632672msgid ""
26642673"This API does nothing since Python 3.12. Previously, this could be called to"
26652674" check if :c:func:`PyUnicode_READY` is necessary."
0 commit comments