@@ -993,66 +993,71 @@ msgstr ""
993993
994994#: ../../library/codecs.rst:685
995995msgid "Writes the object's contents encoded to the stream."
996- msgstr ""
996+ msgstr "将编码后的对象内容写入到流。 "
997997
998998#: ../../library/codecs.rst:690
999999msgid ""
10001000"Writes the concatenated list of strings to the stream (possibly by reusing "
10011001"the :meth:`write` method). The standard bytes-to-bytes codecs do not support"
10021002" this method."
1003- msgstr ""
1003+ msgstr "将拼接后的字符串列表写入到流(可能通过重用 :meth:`write` 方法)。 标准的字节到字节编解码器不支持此方法。 "
10041004
10051005#: ../../library/codecs.rst:697
10061006msgid "Flushes and resets the codec buffers used for keeping state."
1007- msgstr ""
1007+ msgstr "刷新并重置用于保持状态的编解码器缓冲区。 "
10081008
10091009#: ../../library/codecs.rst:699
10101010msgid ""
10111011"Calling this method should ensure that the data on the output is put into a "
10121012"clean state that allows appending of new fresh data without having to rescan"
10131013" the whole stream to recover state."
1014- msgstr ""
1014+ msgstr "调用此方法应当确保在干净的状态下放入输出数据,以允许直接添加新的干净数据而无须重新扫描整个流来恢复状态。 "
10151015
10161016#: ../../library/codecs.rst:704
10171017msgid ""
10181018"In addition to the above methods, the :class:`StreamWriter` must also "
10191019"inherit all other methods and attributes from the underlying stream."
1020- msgstr ""
1020+ msgstr "除了上述的方法,:class:`StreamWriter` 还必须继承来自下层流的所有其他方法和属性。 "
10211021
10221022#: ../../library/codecs.rst:711
10231023msgid "StreamReader Objects"
1024- msgstr ""
1024+ msgstr "StreamReader 对象 "
10251025
10261026#: ../../library/codecs.rst:713
10271027msgid ""
10281028"The :class:`StreamReader` class is a subclass of :class:`Codec` and defines "
10291029"the following methods which every stream reader must define in order to be "
10301030"compatible with the Python codec registry."
10311031msgstr ""
1032+ ":class:`StreamReader` 类是 :class:`Codec` 的子类,它定义了以下方法,每个流式读取器都必须定义这些方法以便与 "
1033+ "Python 编解码器注册表相兼容。"
10321034
10331035#: ../../library/codecs.rst:720
10341036msgid "Constructor for a :class:`StreamReader` instance."
1035- msgstr ""
1037+ msgstr ":class:`StreamReader` 实例的构造器。 "
10361038
10371039#: ../../library/codecs.rst:722
10381040msgid ""
10391041"All stream readers must provide this constructor interface. They are free to"
10401042" add additional keyword arguments, but only the ones defined here are used "
10411043"by the Python codec registry."
10421044msgstr ""
1045+ "所有流式读取器必须提供此构造器接口。 它们可以自由地添加额外的关键字参数,但只有在这里定义的参数才会被 Python 编解码器注册表所使用。"
10431046
10441047#: ../../library/codecs.rst:726
10451048msgid ""
10461049"The *stream* argument must be a file-like object open for reading text or "
10471050"binary data, as appropriate for the specific codec."
1048- msgstr ""
1051+ msgstr "*stream* 参数必须为一个基于特定编解码器打开用于读取文本或二进制数据的文件类对象。 "
10491052
10501053#: ../../library/codecs.rst:729
10511054msgid ""
10521055"The :class:`StreamReader` may implement different error handling schemes by "
10531056"providing the *errors* keyword argument. See :ref:`error-handlers` for the "
10541057"standard error handlers the underlying stream codec may support."
10551058msgstr ""
1059+ ":class:`StreamReader` 可以通过提供 *errors* 关键字参数来实现不同的错误处理方案。 请参阅 :ref:`error-"
1060+ "handlers` 了解下层的流式编解码器可支持的标准错误处理方案。"
10561061
10571062#: ../../library/codecs.rst:733
10581063msgid ""
@@ -1061,23 +1066,27 @@ msgid ""
10611066"error handling strategies during the lifetime of the :class:`StreamReader` "
10621067"object."
10631068msgstr ""
1069+ "*errors* 参数将被赋值给一个同名的属性。 通过对此属性赋值就可以在 :class:`StreamReader` "
1070+ "对象的生命期内在不同的错误处理策略之间进行切换。"
10641071
10651072#: ../../library/codecs.rst:737
10661073msgid ""
10671074"The set of allowed values for the *errors* argument can be extended with "
10681075":func:`register_error`."
1069- msgstr ""
1076+ msgstr "*errors* 参数所允许的值集合可以使用 :func:`register_error` 来扩展。 "
10701077
10711078#: ../../library/codecs.rst:743
10721079msgid "Decodes data from the stream and returns the resulting object."
1073- msgstr ""
1080+ msgstr "解码来自流的数据并返回结果对象。 "
10741081
10751082#: ../../library/codecs.rst:745
10761083msgid ""
10771084"The *chars* argument indicates the number of decoded code points or bytes to"
10781085" return. The :func:`read` method will never return more data than requested,"
10791086" but it might return less, if there is not enough available."
10801087msgstr ""
1088+ "*chars* 参数指明要返回的解码后码位或字节数量。 :func:`read` "
1089+ "方法绝不会返回超出请求数量的数据,但如果可用数量不足,它可能返回少于请求数量的数据。"
10811090
10821091#: ../../library/codecs.rst:750
10831092msgid ""
0 commit comments