@@ -1766,24 +1766,31 @@ msgid ""
17661766"decode trailing lead byte and the number of bytes that have been decoded "
17671767"will be stored in *consumed*."
17681768msgstr ""
1769+ "如果 *consumed* 为 ``NULL``,则行为类似于 :c:func:`PyUnicode_DecodeMBCS`。 如果 "
1770+ "*consumed* 不为 ``NULL``,则 :c:func:`PyUnicode_DecodeMBCSStateful` "
1771+ "将不会解码末尾的不完整字节并且已被解码的字节数将存储在 *consumed* 中。"
17691772
17701773#: ../../c-api/unicode.rst:1385
17711774msgid ""
17721775"Encode a Unicode object using MBCS and return the result as Python bytes "
17731776"object. Error handling is \" strict\" . Return ``NULL`` if an exception was "
17741777"raised by the codec."
17751778msgstr ""
1779+ "使用 MBCS 编码 Unicode 对象并将结果作为 Python 字节串对象返回。 错误处理方式为 \" strict\" 。 "
1780+ "如果编解码器引发了异常则将返回 ``NULL``。"
17761781
17771782#: ../../c-api/unicode.rst:1392
17781783msgid ""
17791784"Encode the Unicode object using the specified code page and return a Python "
17801785"bytes object. Return ``NULL`` if an exception was raised by the codec. Use "
17811786":c:macro:`!CP_ACP` code page to get the MBCS encoder."
17821787msgstr ""
1788+ "使用指定的代码页编码 Unicode 对象并返回一个 Python 字节串对象。 如果编解码器引发了异常则返回 ``NULL``。 使用 "
1789+ ":c:macro:`!CP_ACP` 代码页来获取 MBCS 解码器。"
17831790
17841791#: ../../c-api/unicode.rst:1400
17851792msgid "Methods & Slots"
1786- msgstr ""
1793+ msgstr "方法和槽位 "
17871794
17881795#: ../../c-api/unicode.rst:1406
17891796msgid "Methods and Slot Functions"
@@ -1794,15 +1801,15 @@ msgid ""
17941801"The following APIs are capable of handling Unicode objects and strings on "
17951802"input (we refer to them as strings in the descriptions) and return Unicode "
17961803"objects or integers as appropriate."
1797- msgstr ""
1804+ msgstr "以下 API 可以处理输入的 Unicode 对象和字符串(在描述中我们称其为字符串)并返回适当的 Unicode 对象或整数值。 "
17981805
17991806#: ../../c-api/unicode.rst:1412
18001807msgid "They all return ``NULL`` or ``-1`` if an exception occurs."
1801- msgstr ""
1808+ msgstr "如果发生异常它们都将返回 ``NULL`` 或 ``-1``。 "
18021809
18031810#: ../../c-api/unicode.rst:1417
18041811msgid "Concat two strings giving a new Unicode string."
1805- msgstr ""
1812+ msgstr "拼接两个字符串得到一个新的 Unicode 字符串。 "
18061813
18071814#: ../../c-api/unicode.rst:1422
18081815msgid ""
@@ -1812,6 +1819,8 @@ msgid ""
18121819"negative, no limit is set. Separators are not included in the resulting "
18131820"list."
18141821msgstr ""
1822+ "拆分一个字符串得到一个 Unicode 字符串的列表。 如果 *sep* 为 ``NULL``,则将根据空格来拆分所有子字符串。 "
1823+ "否则,将根据指定的分隔符来拆分。 最多拆分数为 *maxsplit*。 如为负值,则没有限制。 分隔符不包括在结果列表中。"
18151824
18161825#: ../../c-api/unicode.rst:1430
18171826msgid ""
@@ -1824,7 +1833,7 @@ msgstr ""
18241833msgid ""
18251834"Join a sequence of strings using the given *separator* and return the "
18261835"resulting Unicode string."
1827- msgstr ""
1836+ msgstr "使用给定的 *separator* 合并一个字符串列表并返回结果 Unicode 字符串。 "
18281837
18291838#: ../../c-api/unicode.rst:1444
18301839msgid ""
@@ -1874,13 +1883,13 @@ msgstr ""
18741883msgid ""
18751884"Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, "
18761885"and greater than, respectively."
1877- msgstr ""
1886+ msgstr "比较两个字符串并返回 ``-1``, ``0``, ``1`` 分别表示小于、等于和大于。 "
18781887
18791888#: ../../c-api/unicode.rst:1494
18801889msgid ""
18811890"This function returns ``-1`` upon failure, so one should call "
18821891":c:func:`PyErr_Occurred` to check for errors."
1883- msgstr ""
1892+ msgstr "此函数执行失败时返回 ``-1``,因此应当调用 :c:func:`PyErr_Occurred` 来检查错误。 "
18841893
18851894#: ../../c-api/unicode.rst:1500
18861895msgid ""
@@ -1892,35 +1901,37 @@ msgstr ""
18921901
18931902#: ../../c-api/unicode.rst:1505
18941903msgid "This function does not raise exceptions."
1895- msgstr ""
1904+ msgstr "此函数不会引发异常。 "
18961905
18971906#: ../../c-api/unicode.rst:1510
18981907msgid "Rich compare two Unicode strings and return one of the following:"
18991908msgstr "对两个 Unicode 字符串执行富比较并返回以下值之一:"
19001909
19011910#: ../../c-api/unicode.rst:1512
19021911msgid "``NULL`` in case an exception was raised"
1903- msgstr ""
1912+ msgstr "``NULL`` 用于引发了异常的情况 "
19041913
19051914#: ../../c-api/unicode.rst:1513
19061915msgid ":c:data:`Py_True` or :c:data:`Py_False` for successful comparisons"
1907- msgstr ""
1916+ msgstr ":c:data:`Py_True` 或 :c:data:`Py_False` 用于成功完成比较的情况 "
19081917
19091918#: ../../c-api/unicode.rst:1514
19101919msgid ":c:data:`Py_NotImplemented` in case the type combination is unknown"
1911- msgstr ""
1920+ msgstr ":c:data:`Py_NotImplemented` 用于类型组合未知的情况 "
19121921
19131922#: ../../c-api/unicode.rst:1516
19141923msgid ""
19151924"Possible values for *op* are :c:macro:`Py_GT`, :c:macro:`Py_GE`, "
19161925":c:macro:`Py_EQ`, :c:macro:`Py_NE`, :c:macro:`Py_LT`, and :c:macro:`Py_LE`."
19171926msgstr ""
1927+ "可能的 *op* 值有 :c:macro:`Py_GT`, :c:macro:`Py_GE`, :c:macro:`Py_EQ`, "
1928+ ":c:macro:`Py_NE`, :c:macro:`Py_LT`, 和 :c:macro:`Py_LE`。"
19181929
19191930#: ../../c-api/unicode.rst:1522
19201931msgid ""
19211932"Return a new string object from *format* and *args*; this is analogous to "
19221933"``format % args``."
1923- msgstr ""
1934+ msgstr "根据 *format* 和 *args* 返回一个新的字符串对象;这等同于 ``format % args``。 "
19241935
19251936#: ../../c-api/unicode.rst:1528
19261937msgid ""
@@ -1955,3 +1966,5 @@ msgid ""
19551966"object that has been interned, or a new (\" owned\" ) reference to an earlier "
19561967"interned string object with the same value."
19571968msgstr ""
1969+ ":c:func:`PyUnicode_FromString` 和 :c:func:`PyUnicode_InternInPlace` "
1970+ "的组合操作,返回一个已内部化的新 Unicode 字符串对象,或一个指向具有相同值的原有内部化字符串对象的新的(“拥有的”)引用。"
0 commit comments