@@ -7,7 +7,7 @@ msgstr ""
77"Project-Id-Version :Python 3.11\n "
88"Report-Msgid-Bugs-To :\n "
99"POT-Creation-Date :2023-05-09 00:15+0000\n "
10- "PO-Revision-Date :2023-07-17 17:38 +0800\n "
10+ "PO-Revision-Date :2023-07-18 21:30 +0800\n "
1111"Last-Translator :Adrian Liaw <adrianliaw2000@gmail.com>\n "
1212"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
1313"tw)\n "
@@ -20,7 +20,7 @@ msgstr ""
2020
2121#: ../../library/io.rst:2
2222msgid ":mod:`io` --- Core tools for working with streams"
23- msgstr ""
23+ msgstr ":mod:`io` — 處理資料串流的核心工具 "
2424
2525#: ../../library/io.rst:15
2626msgid "**Source code:** :source:`Lib/io.py`"
@@ -56,12 +56,18 @@ msgid ""
5656"stream will raise a :exc:`TypeError`. So will giving a :class:`bytes` "
5757"object to the ``write()`` method of a text stream."
5858msgstr ""
59+ "所有的資料串流都會謹慎處理你所提供的資料的型別。舉例來說,提供一個 :class:"
60+ "`str` 物件給二進位資料串流的 ``write()`` 方法將會引發 :exc:`TypeError`。同樣"
61+ "地,若提供一個 :class:`bytes` 物件給文字資料串流的 ``write()`` 方法,也會引發同"
62+ "樣的錯誤。"
5963
6064#: ../../library/io.rst:45
6165msgid ""
6266"Operations that used to raise :exc:`IOError` now raise :exc:`OSError`, "
6367"since :exc:`IOError` is now an alias of :exc:`OSError`."
6468msgstr ""
69+ "原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :"
70+ "exc:`IOError` 現在是 :exc:`OSError` 的別名。"
6571
6672#: ../../library/io.rst:51 ../../library/io.rst:855 ../../library/io.rst:1122
6773msgid "Text I/O"
@@ -80,17 +86,23 @@ msgid ""
8086"The easiest way to create a text stream is with :meth:`open()`, optionally "
8187"specifying an encoding::"
8288msgstr ""
89+ "建立文字資料串流最簡單的方法是使用 :meth:`open()`,可選擇性地指定編碼:\n"
90+ "\n"
91+ "::"
8392
8493#: ../../library/io.rst:63
8594msgid ""
8695"In-memory text streams are also available as :class:`StringIO` objects::"
8796msgstr ""
97+ "記憶體內的文字資料串流也可以使用 :class:`StringIO` 物件建立:\n"
98+ "\n"
99+ "::"
88100
89101#: ../../library/io.rst:67
90102msgid ""
91103"The text stream API is described in detail in the documentation of :class:"
92104"`TextIOBase`."
93- msgstr ""
105+ msgstr "文字資料串流 API 的詳細說明在 :class:`TextIOBase` 文件當中。 "
94106
95107#: ../../library/io.rst:72 ../../library/io.rst:1110
96108msgid "Binary I/O"
@@ -110,11 +122,18 @@ msgid ""
110122"The easiest way to create a binary stream is with :meth:`open()` with "
111123"``'b'`` in the mode string::"
112124msgstr ""
125+ "建立二進位資料串流最簡單的方法是使用 :meth:`open()`,並在 mode 字串中加入 "
126+ "``'b'``:\n"
127+ "\n"
128+ "::"
113129
114130#: ../../library/io.rst:85
115131msgid ""
116132"In-memory binary streams are also available as :class:`BytesIO` objects::"
117133msgstr ""
134+ "記憶體內的二進位資料串流也可以透過 :class:`BytesIO` 物件來建立:\n"
135+ "\n"
136+ "::"
118137
119138#: ../../library/io.rst:89
120139msgid ""
@@ -214,6 +233,9 @@ msgid ""
214233"`PYTHONWARNDEFAULTENCODING` environment variable, which will emit an :exc:"
215234"`EncodingWarning` when the default encoding is used."
216235msgstr ""
236+ "要找出哪些地方使用到預設的地區編碼,你可以啟用 ``-X warn_default_encoding`` "
237+ "命令列選項,或者設定環境變數 :envvar:`PYTHONWARNDEFAULTENCODING`。當使用到預"
238+ "設編碼時,會引發 :exc:`EncodingWarning`。"
217239
218240#: ../../library/io.rst:153
219241msgid ""
@@ -226,7 +248,7 @@ msgstr ""
226248
227249#: ../../library/io.rst:162
228250msgid "High-level Module Interface"
229- msgstr ""
251+ msgstr "高階模組介面 "
230252
231253#: ../../library/io.rst:166
232254msgid ""
@@ -237,7 +259,7 @@ msgstr ""
237259
238260#: ../../library/io.rst:173
239261msgid "This is an alias for the builtin :func:`open` function."
240- msgstr ""
262+ msgstr "這是內建函式 :func:`open` 的別名。 "
241263
242264#: ../../library/io.rst:175
243265msgid ""
@@ -259,10 +281,12 @@ msgid ""
259281"Opens the provided file with mode ``'rb'``. This function should be used "
260282"when the intent is to treat the contents as executable code."
261283msgstr ""
284+ "以 ``'rb'`` 模式開啟提供的檔案。此函式應用於意圖將內容視為可執行的程式碼的情"
285+ "況下。"
262286
263287#: ../../library/io.rst:187
264288msgid "``path`` should be a :class:`str` and an absolute path."
265- msgstr ""
289+ msgstr "``path`` 應該要屬於 :class:`str` 類別,且是個絕對路徑。 "
266290
267291#: ../../library/io.rst:189
268292msgid ""