@@ -112,7 +112,7 @@ msgstr "f = io.StringIO(\"some initial text data\")"
112
112
msgid ""
113
113
"The text stream API is described in detail in the documentation of "
114
114
":class:`TextIOBase`."
115
- msgstr ":class:`TextIOBase` 的文档中详细描述了文本流的API "
115
+ msgstr ":class:`TextIOBase` 的文档中详细描述了文本流的 API。 "
116
116
117
117
#: ../../library/io.rst:72 ../../library/io.rst:1146
118
118
msgid "Binary I/O"
@@ -126,8 +126,8 @@ msgid ""
126
126
" be used for all kinds of non-text data, and also when manual control over "
127
127
"the handling of text data is desired."
128
128
msgstr ""
129
- "二进制I /O(也称为缓冲I /O)预期 :term:`bytes-like objects <bytes-like object>` 并生成 "
130
- ":class:`bytes` 对象。不执行编码、解码或换行转换。这种类型的流可以用于所有类型的非文本数据,并且还可以在需要手动控制文本数据的处理时使用。"
129
+ "二进制 I /O(也称为缓冲 I /O)接受 :term:`字节型对象 <bytes-like object>` 并生成 :class:`bytes` "
130
+ "对象。不执行编码、解码或换行转换。 这种类型的流可以用于所有类型的非文本数据,并且还可以在需要手动控制文本数据的处理时使用。"
131
131
132
132
#: ../../library/io.rst:80
133
133
msgid ""
@@ -171,8 +171,8 @@ msgid ""
171
171
"manipulate a raw stream from user code. Nevertheless, you can create a raw "
172
172
"stream by opening a file in binary mode with buffering disabled::"
173
173
msgstr ""
174
- "原始 I/O( 也称为 *非缓冲 "
175
- "I/O*)通常用作二进制和文本流的低级构建块。用户代码直接操作原始流的用法非常罕见。 不过,可以通过在禁用缓冲的情况下以二进制模式打开文件来创建原始流:"
174
+ "原始 I/O ( 也称为 *非缓冲 I/O*) 通常用作二进制和文本流的低级构建块。 用户代码直接操作原始流的用法非常罕见。 "
175
+ "不过,可以通过在禁用缓冲的情况下以二进制模式打开文件来创建原始流:"
176
176
177
177
#: ../../library/io.rst:104
178
178
msgid "f = open(\" myfile.jpg\" , \" rb\" , buffering=0)"
@@ -901,6 +901,9 @@ msgid ""
901
901
"with :attr:`BlockingIOError.characters_written` and :meth:`read` will return"
902
902
" data read so far or ``None`` if no data is available."
903
903
msgstr ""
904
+ "此外,如果下层的原始流处于非阻塞模式,当系统返回时会阻塞时 :meth:`write` 将引发 :exc:`BlockingIOError` 并附带 "
905
+ ":attr:`BlockingIOError.characters_written` 而 :meth:`read` "
906
+ "将返回当前读取的数据或者如果数据不可用则返回 ``None``。"
904
907
905
908
#: ../../library/io.rst:533
906
909
msgid ""
@@ -1444,6 +1447,8 @@ msgid ""
1444
1447
"not part of the :class:`TextIOBase` API and may not exist in some "
1445
1448
"implementations."
1446
1449
msgstr ""
1450
+ "由 :class:`TextIOBase` 处理的下层二进制缓冲区(一个 :class:`BufferedIOBase` 或 "
1451
+ ":class:`RawIOBase` 实例)。 它不是 :class:`TextIOBase` API 的组成部分并且不存在于某些实现中。"
1447
1452
1448
1453
#: ../../library/io.rst:896
1449
1454
msgid ""
0 commit comments