@@ -3717,17 +3717,23 @@ msgid ""
37173717":func:`codecs.register_error`, see section :ref:`error-handlers`. For a list"
37183718" of possible encodings, see section :ref:`standard-encodings`."
37193719msgstr ""
3720+ "返回从给定 bytes 解码出来的字符串。 默认编码为 ``'utf-8'``。 可以给出 *errors* 来设置不同的错误处理方案。 "
3721+ "*errors* 的默认值为 ``'strict'``,表示编码错误会引发 :exc:`UnicodeError`。 其他可用的值为 "
3722+ "``'ignore'``, ``'replace'`` 以及任何其他通过 :func:`codecs.register_error` 注册的名称,请参阅"
3723+ " :ref:`error-handlers` 小节。 要查看可用的编码列表,请参阅 :ref:`standard-encodings` 小节。"
37203724
37213725#: ../../library/stdtypes.rst:2538
37223726msgid ""
37233727"Passing the *encoding* argument to :class:`str` allows decoding any :term"
37243728":`bytes-like object` directly, without needing to make a temporary bytes or "
37253729"bytearray object."
37263730msgstr ""
3731+ "将 *encoding* 参数传给 :class:`str` 允许直接解码任何 :term:`bytes-like object`,无须创建临时的 "
3732+ "bytes 或 bytearray 对象。"
37273733
37283734#: ../../library/stdtypes.rst:2542
37293735msgid "Added support for keyword arguments."
3730- msgstr ""
3736+ msgstr "加入了对关键字参数的支持。 "
37313737
37323738#: ../../library/stdtypes.rst:2549
37333739msgid ""
@@ -3736,10 +3742,12 @@ msgid ""
37363742"look for. With optional *start*, test beginning at that position. With "
37373743"optional *end*, stop comparing at that position."
37383744msgstr ""
3745+ "如果二进制数据以指定的 *suffix* 结束则返回 ``True``,否则返回 ``False``。 *suffix* "
3746+ "也可以为由多个供查找的后缀构成的元组。 如果有可选项 *start*,将从所指定位置开始检查。。 如果有可选项 *end*,将在所指定位置停止比较。"
37393747
37403748#: ../../library/stdtypes.rst:2554
37413749msgid "The suffix(es) to search for may be any :term:`bytes-like object`."
3742- msgstr ""
3750+ msgstr "要搜索的后缀可以是任意 :term:`bytes-like object`。 "
37433751
37443752#: ../../library/stdtypes.rst:2560
37453753msgid ""
@@ -3748,19 +3756,23 @@ msgid ""
37483756"arguments *start* and *end* are interpreted as in slice notation. Return "
37493757"``-1`` if *sub* is not found."
37503758msgstr ""
3759+ "返回子序列 *sub* 在数据中被找到的最小索引,*sub* 包含于切片 ``s[start:end]`` 之内。 可选参数 *start* 与 "
3760+ "*end* 会被解读为切片表示法。 如果 *sub* 未被找到则返回 ``-1``。"
37513761
37523762#: ../../library/stdtypes.rst:2570
37533763msgid ""
37543764"The :meth:`~bytes.find` method should be used only if you need to know the "
37553765"position of *sub*. To check if *sub* is a substring or not, use the "
37563766":keyword:`in` operator::"
37573767msgstr ""
3768+ ":meth:`~bytes.find` 方法应该只在你需要知道 *sub* 所在位置时使用。 要检查 *sub* 是否为子串,请使用 "
3769+ ":keyword:`in` 操作符::"
37583770
37593771#: ../../library/stdtypes.rst:2584
37603772msgid ""
37613773"Like :meth:`~bytes.find`, but raise :exc:`ValueError` when the subsequence "
37623774"is not found."
3763- msgstr ""
3775+ msgstr "类似于 :meth:`~bytes.find`,但在找不到子序列时会引发 :exc:`ValueError`。 "
37643776
37653777#: ../../library/stdtypes.rst:2597
37663778msgid ""
@@ -3771,6 +3783,9 @@ msgid ""
37713783"elements is the contents of the bytes or bytearray object providing this "
37723784"method."
37733785msgstr ""
3786+ "返回一个由 *iterable* 中的二进制数据序列拼接而成的 bytes 或 bytearray 对象。 如果 *iterable* 中存在任何非 "
3787+ ":term:`字节类对象 <bytes-like object>` 包括存在 :class:`str` 对象值则会引发 "
3788+ ":exc:`TypeError`。 提供该方法的 bytes 或 bytearray 对象的内容将作为元素之间的分隔。"
37743789
37753790#: ../../library/stdtypes.rst:2608
37763791msgid ""
0 commit comments