@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version : Python 3.11\n "
1414"Report-Msgid-Bugs-To : \n "
15- "POT-Creation-Date : 2023-12-15 16:34 +0000\n "
15+ "POT-Creation-Date : 2023-12-23 00:32 +0000\n "
1616"PO-Revision-Date : 2023-05-24 02:09+0000\n "
1717"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2023\n "
1818"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -1879,6 +1879,8 @@ msgid ""
18791879"end (*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` "
18801880"a suffix match), ``0`` otherwise. Return ``-1`` if an error occurred."
18811881msgstr ""
1882+ "如果 *substr* 在给定的端点 (*direction* == ``-1`` 表示前缀匹配, *direction* == ``1`` "
1883+ "表示后缀匹配) 与 ``unicode[start:end]`` 相匹配则返回 ``1``,否则返回 ``0``。 如果发生错误则返回 ``-1``。"
18821884
18831885#: ../../c-api/unicode.rst:1452
18841886msgid ""
@@ -1888,6 +1890,9 @@ msgid ""
18881890"the first match; a value of ``-1`` indicates that no match was found, and "
18891891"``-2`` indicates that an error occurred and an exception has been set."
18901892msgstr ""
1893+ "返回使用给定的 *direction* (*direction* == ``1`` 表示前向搜索,*direction* == ``-1`` "
1894+ "表示后向搜索) 时 *substr* 在 ``unicode[start:end]`` 中首次出现的位置。 返回值为首个匹配的索引号;值为 ``-1``"
1895+ " 表示未找到匹配,``-2`` 则表示发生了错误并设置了异常。"
18911896
18921897#: ../../c-api/unicode.rst:1462
18931898msgid ""
@@ -1898,24 +1903,29 @@ msgid ""
18981903"found, and ``-2`` indicates that an error occurred and an exception has been"
18991904" set."
19001905msgstr ""
1906+ "返回使用给定的 *direction* (*direction* == ``1`` 表示前向搜索,*direction* == ``-1`` "
1907+ "表示后向搜索) 时字符 *ch* 在 ``unicode[start:end]`` 中首次出现的位置。 返回值为首个匹配的索引号;值为 ``-1`` "
1908+ "表示未找到匹配,``-2`` 则表示发生错误并设置了异常。"
19011909
19021910#: ../../c-api/unicode.rst:1470
19031911msgid ""
19041912"*start* and *end* are now adjusted to behave like ``unicode[start:end]``."
1905- msgstr ""
1913+ msgstr "现在 *start* 和 *end* 被调整为与 ``unicode[start:end]`` 类似的行为。 "
19061914
19071915#: ../../c-api/unicode.rst:1477
19081916msgid ""
19091917"Return the number of non-overlapping occurrences of *substr* in "
19101918"``unicode[start:end]``. Return ``-1`` if an error occurred."
1911- msgstr ""
1919+ msgstr "返回 *substr* 在 ``unicode[start:end]`` 中不重叠出现的次数。 如果发生错误则返回 ``-1``。 "
19121920
19131921#: ../../c-api/unicode.rst:1484
19141922msgid ""
19151923"Replace at most *maxcount* occurrences of *substr* in *unicode* with "
19161924"*replstr* and return the resulting Unicode object. *maxcount* == ``-1`` "
19171925"means replace all occurrences."
19181926msgstr ""
1927+ "将 *unicode* 中 *substr* 替换为 *replstr* 至多 *maxcount* 次并返回结果 Unicode 对象。 "
1928+ "*maxcount* == ``-1`` 表示全部替换。"
19191929
19201930#: ../../c-api/unicode.rst:1491
19211931msgid ""
@@ -1936,6 +1946,8 @@ msgid ""
19361946"pass only ASCII-encoded strings, but the function interprets the input "
19371947"string as ISO-8859-1 if it contains non-ASCII characters."
19381948msgstr ""
1949+ "将 Unicode 对象 *unicode* 与 *string* 进行比较并返回 ``-1``, ``0``, ``1`` 分别表示小于、等于和大于。"
1950+ " 最好只传入 ASCII 编码的字符串,但如果输入字符串包含非 ASCII 字符则此函数会将其按 ISO-8859-1 编码格式来解读。"
19391951
19401952#: ../../c-api/unicode.rst:1505
19411953msgid "This function does not raise exceptions."
@@ -1975,13 +1987,13 @@ msgstr "根据 *format* 和 *args* 返回一个新的字符串对象;这等同
19751987msgid ""
19761988"Check whether *substr* is contained in *unicode* and return true or false "
19771989"accordingly."
1978- msgstr ""
1990+ msgstr "检查 *substr* 是否包含在 *unicode* 中并相应返回真值或假值。 "
19791991
19801992#: ../../c-api/unicode.rst:1531
19811993msgid ""
19821994"*substr* has to coerce to a one element Unicode string. ``-1`` is returned "
19831995"if there was an error."
1984- msgstr ""
1996+ msgstr "*substr* 必须强制转为一个单元素 Unicode 字符串。 如果发生错误则返回 ``-1``。 "
19851997
19861998#: ../../c-api/unicode.rst:1537
19871999msgid ""
@@ -1996,6 +2008,11 @@ msgid ""
19962008"references, think of this function as reference-neutral; you own the object "
19972009"after the call if and only if you owned it before the call.)"
19982010msgstr ""
2011+ "原地内部化参数 :c:expr:`*p_unicode`。 该参数必须是一个指向 Python Unicode 字符串对象的指针变量的地址。 "
2012+ "如果已存在与 :c:expr:`*p_unicode` 相同的内部化字符串,则将其设为 :c:expr:`*p_unicode` "
2013+ "(释放对旧字符串的引用并新建一个指向内部化字符串对象的 :term:`strong reference`),否则将保持 "
2014+ ":c:expr:`*p_unicode` 不变并将其内部化 (新建一个 :term:`strong reference`)。 "
2015+ "(澄清说明:虽然这里大量提及了引用,但请将此函数视为引用无关的;当且仅当你在调用之前就已拥有该对象时你才会在调用之后也拥有它。)"
19992016
20002017#: ../../c-api/unicode.rst:1550
20012018msgid ""
0 commit comments