@@ -652,63 +652,76 @@ msgstr "為了方便起見,允許多次呼叫這個方法;然而,只有第
652
652
653
653
#: ../../library/io.rst:362
654
654
msgid "``True`` if the stream is closed."
655
- msgstr ""
655
+ msgstr "如果串流已關閉,則為 ``True``。 "
656
656
657
657
#: ../../library/io.rst:366
658
658
msgid ""
659
659
"Return the underlying file descriptor (an integer) of the stream if it "
660
660
"exists. An :exc:`OSError` is raised if the IO object does not use a file "
661
661
"descriptor."
662
662
msgstr ""
663
+ "如果串流存在,則回傳其底層的檔案描述器(一個整數)。如果 IO 物件不使用檔案描"
664
+ "述器,則會引發一個 :exc:`OSError` 例外。"
663
665
664
666
#: ../../library/io.rst:372
665
667
msgid ""
666
668
"Flush the write buffers of the stream if applicable. This does nothing for "
667
669
"read-only and non-blocking streams."
668
670
msgstr ""
671
+ "如果適用,清空串流的寫入緩衝區。對於唯讀和非阻塞串流,此操作不會執行任何操"
672
+ "作。"
669
673
670
674
#: ../../library/io.rst:377
671
675
msgid ""
672
676
"Return ``True`` if the stream is interactive (i.e., connected to a terminal/"
673
677
"tty device)."
674
- msgstr ""
678
+ msgstr "如果串流是互動式的(即連接到終端機/tty 設備),則回傳 ``True``。 "
675
679
676
680
#: ../../library/io.rst:382
677
681
msgid ""
678
682
"Return ``True`` if the stream can be read from. If ``False``, :meth:`!read` "
679
683
"will raise :exc:`OSError`."
680
684
msgstr ""
685
+ "如果串流可以被讀取,則回傳 ``True``。如果是 ``False``,:meth:`!read` 將會引"
686
+ "發 :exc:`OSError` 例外。"
681
687
682
688
#: ../../library/io.rst:387
683
689
msgid ""
684
690
"Read and return one line from the stream. If *size* is specified, at most "
685
691
"*size* bytes will be read."
686
- msgstr ""
692
+ msgstr "從串流讀取並回傳一行。如果指定了 *size*,則最多讀取 *size* 個位元組。 "
687
693
688
694
#: ../../library/io.rst:390
689
695
msgid ""
690
696
"The line terminator is always ``b'\\ n'`` for binary files; for text files, "
691
697
"the *newline* argument to :func:`open` can be used to select the line "
692
698
"terminator(s) recognized."
693
699
msgstr ""
700
+ "對於二進位檔案,行結束符總是 ``b'\\ n'``;對於文字檔案,可以使用 :func:`open` "
701
+ "函式的 *newline* 引數來選擇識別的行結束符號。"
694
702
695
703
#: ../../library/io.rst:396
696
704
msgid ""
697
705
"Read and return a list of lines from the stream. *hint* can be specified to "
698
706
"control the number of lines read: no more lines will be read if the total "
699
707
"size (in bytes/characters) of all lines so far exceeds *hint*."
700
708
msgstr ""
709
+ "從串流讀取並回傳一個含有一或多行的 list。可以指定 *hint* 來控制讀取的行數:如"
710
+ "果到目前為止所有行的總大小(以位元組/字元計)超過 *hint*,則不會再讀取更多"
711
+ "行。"
701
712
702
713
#: ../../library/io.rst:400
703
714
msgid ""
704
715
"*hint* values of ``0`` or less, as well as ``None``, are treated as no hint."
705
- msgstr ""
716
+ msgstr "*hint* 值為 ``0`` 或更小,以及 ``None``,都被視為沒有提供 hint。 "
706
717
707
718
#: ../../library/io.rst:403
708
719
msgid ""
709
720
"Note that it's already possible to iterate on file objects using ``for line "
710
721
"in file: ...`` without calling :meth:`!file.readlines`."
711
722
msgstr ""
723
+ "請注意,已經可以使用 ``for line in file: ...`` 在檔案物件上進行疊代,而不一定"
724
+ "需要呼叫 :meth:`!file.readlines`。"
712
725
713
726
#: ../../library/io.rst:408
714
727
msgid ""
0 commit comments