Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 312c095

Browse files
committed
Add more translations of library/io
1 parent 5066292 commit 312c095

File tree

1 file changed

+30
-5
lines changed

1 file changed

+30
-5
lines changed

library/io.po

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -787,23 +787,29 @@ msgid ""
787787
"Return ``True`` if the stream supports writing. If ``False``, :meth:`!"
788788
"write` and :meth:`truncate` will raise :exc:`OSError`."
789789
msgstr ""
790+
"如果串流支援寫入,則回傳 ``True``。如果是 ``False``,:meth:`!write` 和 :meth:"
791+
"`truncate` 將會引發 :exc:`OSError`。"
790792

791793
#: ../../library/io.rst:456
792794
msgid ""
793795
"Write a list of lines to the stream. Line separators are not added, so it "
794796
"is usual for each of the lines provided to have a line separator at the end."
795797
msgstr ""
798+
"將一個包含每一行的 list 寫入串流。這不會新增行分隔符號,因此通常提供的每一行"
799+
"末尾都有一個行分隔符號。"
796800

797801
#: ../../library/io.rst:462
798802
msgid ""
799803
"Prepare for object destruction. :class:`IOBase` provides a default "
800804
"implementation of this method that calls the instance's :meth:`~IOBase."
801805
"close` method."
802806
msgstr ""
807+
"為物件銷毀做準備。:class:`IOBase` 提供了這個方法的預設實作,該實作會呼叫實例"
808+
"的 :meth:`~IOBase.close` 方法。"
803809

804810
#: ../../library/io.rst:469
805811
msgid "Base class for raw binary streams. It inherits :class:`IOBase`."
806-
msgstr ""
812+
msgstr "原始二進位串流的衍生類別。它繼承自 :class:`IOBase`。"
807813

808814
#: ../../library/io.rst:471
809815
msgid ""
@@ -812,12 +818,15 @@ msgid ""
812818
"(this functionality is done at a higher-level in buffered binary streams and "
813819
"text streams, described later in this page)."
814820
msgstr ""
821+
"原始二進位串流通常提供對底層作業系統設備或 API 的低階存取,並不嘗試將其封裝在"
822+
"高階語言中(這項功能在緩衝二進位串流和文字串流中的更高階層級完成,後面的頁面"
823+
"會有描述)。"
815824

816825
#: ../../library/io.rst:476
817826
msgid ""
818827
":class:`RawIOBase` provides these methods in addition to those from :class:"
819828
"`IOBase`:"
820-
msgstr ""
829+
msgstr ":class:`RawIOBase` 除了 :class:`IOBase` 的方法外,還提供以下這些方法:"
821830

822831
#: ../../library/io.rst:481
823832
msgid ""
@@ -826,24 +835,29 @@ msgid ""
826835
"only one system call is ever made. Fewer than *size* bytes may be returned "
827836
"if the operating system call returns fewer than *size* bytes."
828837
msgstr ""
838+
"從物件中讀取最多 *size* 個位元組並回傳。方便起見,如果 *size* 未指定或為 -1,"
839+
"則回傳直到檔案結尾 (EOF) 的所有位元組。否則,只會進行一次系統呼叫。如果作業系"
840+
"統呼叫回傳的位元組少於 *size*,則可能回傳少於 *size* 的位元組。"
829841

830842
#: ../../library/io.rst:486
831843
msgid ""
832844
"If 0 bytes are returned, and *size* was not 0, this indicates end of file. "
833845
"If the object is in non-blocking mode and no bytes are available, ``None`` "
834846
"is returned."
835847
msgstr ""
848+
"如果回傳了 0 位元組,且 *size* 不是 0,這表示檔案結尾 (end of file)。如果物件"
849+
"處於非阻塞模式且沒有可用的位元組,則回傳 ``None``。"
836850

837851
#: ../../library/io.rst:490
838852
msgid ""
839853
"The default implementation defers to :meth:`readall` and :meth:`readinto`."
840-
msgstr ""
854+
msgstr "預設的實作是延遲到 :meth:`readall` 和 :meth:`readinto`。"
841855

842856
#: ../../library/io.rst:495
843857
msgid ""
844858
"Read and return all the bytes from the stream until EOF, using multiple "
845859
"calls to the stream if necessary."
846-
msgstr ""
860+
msgstr "讀取並回傳串流中直到檔案結尾的所有位元組,必要時使用多次對串流的呼叫。"
847861

848862
#: ../../library/io.rst:500
849863
msgid ""
@@ -852,6 +866,9 @@ msgid ""
852866
"`bytearray`. If the object is in non-blocking mode and no bytes are "
853867
"available, ``None`` is returned."
854868
msgstr ""
869+
"將位元組讀入一個預先分配的、可寫的 :term:`bytes-like object` (類位元組物"
870+
"件) *b* 中,並回傳讀取的位元組數量。例如,*b* 可能是一個 :class:"
871+
"`bytearray`。如果物件處於非阻塞模式且沒有可用的位元組,則回傳 ``None``。"
855872

856873
#: ../../library/io.rst:508
857874
msgid ""
@@ -863,12 +880,17 @@ msgid ""
863880
"to it. The caller may release or mutate *b* after this method returns, so "
864881
"the implementation should only access *b* during the method call."
865882
msgstr ""
883+
"將給定的 :term:`類位元組物件` (類位元組物件),*b*,寫入底層的原始串流,並回"
884+
"傳寫入的位元組大小。根據底層原始串流的具體情況,這可能少於 *b* 的位元組長度,"
885+
"尤其是當它處於非阻塞模式時。如果原始串流設置為非阻塞且無法立即寫入任何單一位"
886+
"元組,則回傳 ``None``。呼叫者在此方法返回後可以釋放或變更 *b*,因此實作應該只"
887+
"在方法呼叫期間存取 *b*。"
866888

867889
#: ../../library/io.rst:521
868890
msgid ""
869891
"Base class for binary streams that support some kind of buffering. It "
870892
"inherits :class:`IOBase`."
871-
msgstr ""
893+
msgstr "支援某種緩衝的二進位串流的基礎類別。它繼承自 :class:`IOBase`。"
872894

873895
#: ../../library/io.rst:524
874896
msgid ""
@@ -877,6 +899,9 @@ msgid ""
877899
"input as requested or to consume all given output, at the expense of making "
878900
"perhaps more than one system call."
879901
msgstr ""
902+
"與 :class:`RawIOBase` 的主要差異在於,方法 :meth:`read`、:meth:`readinto` "
903+
"及 :meth:`write` 將分別嘗試讀取所請求的盡可能多的輸入,或消耗所有給定的輸出,"
904+
"即使可能需要進行多於一次的系統呼叫。"
880905

881906
#: ../../library/io.rst:529
882907
msgid ""

0 commit comments

Comments
 (0)