1212# isaced <[email protected] >, 20181313# eric R <[email protected] >, 20181414# CommonZ <[email protected] >, 201815- 1615# Zombie110year <[email protected] >, 20191716# stonejing <[email protected] >, 20191817# ppcfish <[email protected] >, 2019@@ -1394,8 +1393,8 @@ msgid ""
13941393"empty list. Modifying any of the elements of ``lists`` modifies this single"
13951394" list. You can create a list of different lists this way::"
13961395msgstr ""
1397- "具体的原因在于 ``[[]]`` 是一个包含了一个空列表的单元素列表,所以 ``[[]] * 3`` 结果中的三个元素都是对这一个空列表的引用。。 修改"
1398- " ``lists`` 中的任何一个元素实际上都是对这一个空列表的修改。 你可以用以下方式创建以不同列表为元素的列表::"
1396+ "具体的原因在于 ``[[]]`` 是一个包含了一个空列表的单元素列表,所以 ``[[]] * 3`` 结果中的三个元素都是对这一个空列表的引用。 修改 "
1397+ "``lists`` 中的任何一个元素实际上都是对这一个空列表的修改。 你可以用以下方式创建以不同列表为元素的列表::"
13991398
14001399#: ../../library/stdtypes.rst:933
14011400msgid ""
@@ -2668,7 +2667,7 @@ msgid ""
26682667"containing two empty strings, followed by the string itself."
26692668msgstr ""
26702669"在 *sep* 最后一次出现的位置拆分字符串,返回一个 3 元组,其中包含分隔符之前的部分、分隔符本身,以及分隔符之后的部分。 "
2671- "如果分隔符未找到,则返回的 3 元组中包含两个空字符串以及字符本身 。"
2670+ "如果分隔符未找到,则返回的 3 元组中包含两个空字符串以及字符串本身 。"
26722671
26732672#: ../../library/stdtypes.rst:1848
26742673msgid ""
@@ -3380,7 +3379,7 @@ msgstr ":mod:`array` 模块支持高效地存储基本数据类型,例如 32
33803379
33813380#: ../../library/stdtypes.rst:2310
33823381msgid "Bytes Objects"
3383- msgstr "字节对象 "
3382+ msgstr "bytes 对象 "
33843383
33853384#: ../../library/stdtypes.rst:2314
33863385msgid ""
@@ -3743,7 +3742,7 @@ msgid ""
37433742"optional *end*, stop comparing at that position."
37443743msgstr ""
37453744"如果二进制数据以指定的 *suffix* 结束则返回 ``True``,否则返回 ``False``。 *suffix* "
3746- "也可以为由多个供查找的后缀构成的元组。 如果有可选项 *start*,将从所指定位置开始检查。。 如果有可选项 *end*,将在所指定位置停止比较。"
3745+ "也可以为由多个供查找的后缀构成的元组。 如果有可选项 *start*,将从所指定位置开始检查。 如果有可选项 *end*,将在所指定位置停止比较。"
37473746
37483747#: ../../library/stdtypes.rst:2554
37493748msgid "The suffix(es) to search for may be any :term:`bytes-like object`."
@@ -3794,6 +3793,8 @@ msgid ""
37943793"character at the same position in *to*; *from* and *to* must both be :term"
37953794":`bytes-like objects <bytes-like object>` and have the same length."
37963795msgstr ""
3796+ "此静态方法返回一个可用于 :meth:`bytes.translate` 的转换对照表,它将把 *from* 中的每个字符映射为 *to* "
3797+ "中相同位置上的字符;*from* 与 *to* 必须都是 :term:`字节类对象 <bytes-like object>` 并且具有相同的长度。"
37973798
37983799#: ../../library/stdtypes.rst:2619
37993800msgid ""
@@ -3803,23 +3804,26 @@ msgid ""
38033804"found, return a 3-tuple containing a copy of the original sequence, followed"
38043805" by two empty bytes or bytearray objects."
38053806msgstr ""
3807+ "在 *sep* 首次出现的位置拆分序列,返回一个 3 元组,其中包含分隔符之前的部分、分隔符本身或其 bytearray 副本,以及分隔符之后的部分。 "
3808+ "如果分隔符未找到,则返回的 3 元组中包含原序列以及两个空的 bytes 或 bytearray 对象。"
38063809
38073810#: ../../library/stdtypes.rst:2626 ../../library/stdtypes.rst:2683
38083811msgid "The separator to search for may be any :term:`bytes-like object`."
3809- msgstr ""
3812+ msgstr "要搜索的分隔符可以是任意 :term:`bytes-like object`。 "
38103813
38113814#: ../../library/stdtypes.rst:2632
38123815msgid ""
38133816"Return a copy of the sequence with all occurrences of subsequence *old* "
38143817"replaced by *new*. If the optional argument *count* is given, only the "
38153818"first *count* occurrences are replaced."
38163819msgstr ""
3820+ "返回序列的副本,其中出现的所有子序列 *old* 都将被替换为 *new*。 如果给出了可选参数 *count*,则只替换前 *count* 次出现。"
38173821
38183822#: ../../library/stdtypes.rst:2636
38193823msgid ""
38203824"The subsequence to search for and its replacement may be any :term:`bytes-"
38213825"like object`."
3822- msgstr ""
3826+ msgstr "要搜索的子序列及其替换序列可以是任意 :term:`bytes-like object`。 "
38233827
38243828#: ../../library/stdtypes.rst:2641 ../../library/stdtypes.rst:2734
38253829#: ../../library/stdtypes.rst:2748 ../../library/stdtypes.rst:2772
@@ -3832,7 +3836,7 @@ msgstr ""
38323836msgid ""
38333837"The bytearray version of this method does *not* operate in place - it always"
38343838" produces a new object, even if no changes were made."
3835- msgstr ""
3839+ msgstr "此方法的 bytearray 版本 *并非* 原地操作 —— 它总是产生一个新对象,即便没有做任何改变。 "
38363840
38373841#: ../../library/stdtypes.rst:2648
38383842msgid ""
@@ -3841,12 +3845,14 @@ msgid ""
38413845"arguments *start* and *end* are interpreted as in slice notation. Return "
38423846"``-1`` on failure."
38433847msgstr ""
3848+ "返回子序列 *sub* 在序列内被找到的最大(最右)索引,这样 *sub* 将包含在 ``s[start:end]`` 当中。 可选参数 *start*"
3849+ " 与 *end* 会被解读为切片表示法。 如果未找到则返回 ``-1``。"
38443850
38453851#: ../../library/stdtypes.rst:2663
38463852msgid ""
38473853"Like :meth:`~bytes.rfind` but raises :exc:`ValueError` when the subsequence "
38483854"*sub* is not found."
3849- msgstr ""
3855+ msgstr "类似于 :meth:`~bytes.rfind`,但在子序列 *sub* 未找到时会引发 :exc:`ValueError`。 "
38503856
38513857#: ../../library/stdtypes.rst:2676
38523858msgid ""
@@ -3856,6 +3862,8 @@ msgid ""
38563862"found, return a 3-tuple containing two empty bytes or bytearray objects, "
38573863"followed by a copy of the original sequence."
38583864msgstr ""
3865+ "在 *sep* 最后一次出现的位置拆分序列,返回一个 3 元组,其中包含分隔符之前的部分,分隔符本身或其 bytearray "
3866+ "副本,以及分隔符之后的部分。 如果分隔符未找到,则返回的 3 元组中包含两个空的 bytes 或 bytearray 对象以及原序列的副本。"
38593867
38603868#: ../../library/stdtypes.rst:2689
38613869msgid ""
@@ -3864,10 +3872,12 @@ msgid ""
38643872"look for. With optional *start*, test beginning at that position. With "
38653873"optional *end*, stop comparing at that position."
38663874msgstr ""
3875+ "如果二进制数据以指定的 *prefix* 开头则返回 ``True``,否则返回 ``False``。 *prefix* "
3876+ "也可以为由多个供查找的前缀构成的元组。 如果有可选项 *start*,将从所指定位置开始检查。 如果有可选项 *end*,将在所指定位置停止比较。"
38673877
38683878#: ../../library/stdtypes.rst:2694
38693879msgid "The prefix(es) to search for may be any :term:`bytes-like object`."
3870- msgstr ""
3880+ msgstr "要搜索的前缀可以是任意 :term:`bytes-like object`。 "
38713881
38723882#: ../../library/stdtypes.rst:2700
38733883msgid ""
@@ -3876,22 +3886,24 @@ msgid ""
38763886"been mapped through the given translation table, which must be a bytes "
38773887"object of length 256."
38783888msgstr ""
3889+ "返回原 bytes 或 bytearray 对象的副本,移除其中所有在可选参数 *delete* 中出现的 bytes,其余 bytes "
3890+ "将通过给定的转换表进行映射,该转换表必须是长度为 256 的 bytes 对象。"
38793891
38803892#: ../../library/stdtypes.rst:2705
38813893msgid ""
38823894"You can use the :func:`bytes.maketrans` method to create a translation "
38833895"table."
3884- msgstr ""
3896+ msgstr "你可以使用 :func:`bytes.maketrans` 方法来创建转换表。 "
38853897
38863898#: ../../library/stdtypes.rst:2708
38873899msgid ""
38883900"Set the *table* argument to ``None`` for translations that only delete "
38893901"characters::"
3890- msgstr ""
3902+ msgstr "对于仅需移除字符的转换,请将 *table* 参数设为 ``None``:: "
38913903
38923904#: ../../library/stdtypes.rst:2714
38933905msgid "*delete* is now supported as a keyword argument."
3894- msgstr ""
3906+ msgstr "现在支持将 *delete* 作为关键字参数。 "
38953907
38963908#: ../../library/stdtypes.rst:2718
38973909msgid ""
0 commit comments