diff --git a/library/io.po b/library/io.po index d8f43c3f63..799a6543b7 100644 --- a/library/io.po +++ b/library/io.po @@ -652,7 +652,7 @@ msgstr "為了方便起見,允許多次呼叫這個方法;然而,只有第 #: ../../library/io.rst:362 msgid "``True`` if the stream is closed." -msgstr "" +msgstr "如果串流已關閉,則為 ``True``。" #: ../../library/io.rst:366 msgid "" @@ -660,30 +660,36 @@ msgid "" "exists. An :exc:`OSError` is raised if the IO object does not use a file " "descriptor." msgstr "" +"如果串流存在,則回傳其底層的檔案描述器(一個整數)。如果 IO 物件不使用檔案描" +"述器,則會引發一個 :exc:`OSError` 例外。" #: ../../library/io.rst:372 msgid "" "Flush the write buffers of the stream if applicable. This does nothing for " "read-only and non-blocking streams." msgstr "" +"如果適用,清空串流的寫入緩衝區。對於唯讀和非阻塞串流,此操作不會執行任何操" +"作。" #: ../../library/io.rst:377 msgid "" "Return ``True`` if the stream is interactive (i.e., connected to a terminal/" "tty device)." -msgstr "" +msgstr "如果串流是互動式的(即連接到終端機/tty 設備),則回傳 ``True``。" #: ../../library/io.rst:382 msgid "" "Return ``True`` if the stream can be read from. If ``False``, :meth:`!read` " "will raise :exc:`OSError`." msgstr "" +"如果串流可以被讀取,則回傳 ``True``。如果是 ``False``,:meth:`!read` 將會引" +"發 :exc:`OSError` 例外。" #: ../../library/io.rst:387 msgid "" "Read and return one line from the stream. If *size* is specified, at most " "*size* bytes will be read." -msgstr "" +msgstr "從串流讀取並回傳一行。如果指定了 *size*,則最多讀取 *size* 個位元組。" #: ../../library/io.rst:390 msgid "" @@ -691,6 +697,8 @@ msgid "" "the *newline* argument to :func:`open` can be used to select the line " "terminator(s) recognized." msgstr "" +"對於二進位檔案,行結束符總是 ``b'\\n'``;對於文字檔案,可以使用 :func:`open` " +"函式的 *newline* 引數來選擇識別的行結束符號。" #: ../../library/io.rst:396 msgid "" @@ -698,17 +706,22 @@ msgid "" "control the number of lines read: no more lines will be read if the total " "size (in bytes/characters) of all lines so far exceeds *hint*." msgstr "" +"從串流讀取並回傳一個含有一或多行的 list。可以指定 *hint* 來控制讀取的行數:如" +"果到目前為止所有行的總大小(以位元組/字元計)超過 *hint*,則不會再讀取更多" +"行。" #: ../../library/io.rst:400 msgid "" "*hint* values of ``0`` or less, as well as ``None``, are treated as no hint." -msgstr "" +msgstr "*hint* 值為 ``0`` 或更小,以及 ``None``,都被視為沒有提供 hint。" #: ../../library/io.rst:403 msgid "" "Note that it's already possible to iterate on file objects using ``for line " "in file: ...`` without calling :meth:`!file.readlines`." msgstr "" +"請注意,已經可以使用 ``for line in file: ...`` 在檔案物件上進行疊代,而不一定" +"需要呼叫 :meth:`!file.readlines`。" #: ../../library/io.rst:408 msgid ""