@@ -7,7 +7,7 @@ msgstr ""
7
7
"Project-Id-Version : Python 3.12\n "
8
8
"Report-Msgid-Bugs-To : \n "
9
9
"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 "
11
11
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
12
12
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
13
13
"tw)\n "
@@ -20,7 +20,7 @@ msgstr ""
20
20
21
21
#: ../../library/io.rst:2
22
22
msgid ":mod:`io` --- Core tools for working with streams"
23
- msgstr ""
23
+ msgstr ":mod:`io` — 處理資料串流的核心工具 "
24
24
25
25
#: ../../library/io.rst:15
26
26
msgid "**Source code:** :source:`Lib/io.py`"
@@ -56,12 +56,18 @@ msgid ""
56
56
"stream will raise a :exc:`TypeError`. So will giving a :class:`bytes` "
57
57
"object to the ``write()`` method of a text stream."
58
58
msgstr ""
59
+ "所有的資料串流都會謹慎處理你所提供的資料的型別。舉例來說,提供一個 :class:"
60
+ "`str` 物件給二進位資料串流的 ``write()`` 方法將會引發 :exc:`TypeError`。同樣"
61
+ "地,若提供一個 :class:`bytes` 物件給文字資料串流的 ``write()`` 方法,也會引發同"
62
+ "樣的錯誤。"
59
63
60
64
#: ../../library/io.rst:45
61
65
msgid ""
62
66
"Operations that used to raise :exc:`IOError` now raise :exc:`OSError`, "
63
67
"since :exc:`IOError` is now an alias of :exc:`OSError`."
64
68
msgstr ""
69
+ "原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :"
70
+ "exc:`IOError` 現在是 :exc:`OSError` 的別名。"
65
71
66
72
#: ../../library/io.rst:51 ../../library/io.rst:855 ../../library/io.rst:1122
67
73
msgid "Text I/O"
@@ -80,17 +86,23 @@ msgid ""
80
86
"The easiest way to create a text stream is with :meth:`open()`, optionally "
81
87
"specifying an encoding::"
82
88
msgstr ""
89
+ "建立文字資料串流最簡單的方法是使用 :meth:`open()`,可選擇性地指定編碼:\n"
90
+ "\n"
91
+ "::"
83
92
84
93
#: ../../library/io.rst:63
85
94
msgid ""
86
95
"In-memory text streams are also available as :class:`StringIO` objects::"
87
96
msgstr ""
97
+ "記憶體內的文字資料串流也可以使用 :class:`StringIO` 物件建立:\n"
98
+ "\n"
99
+ "::"
88
100
89
101
#: ../../library/io.rst:67
90
102
msgid ""
91
103
"The text stream API is described in detail in the documentation of :class:"
92
104
"`TextIOBase`."
93
- msgstr ""
105
+ msgstr "文字資料串流 API 的詳細說明在 :class:`TextIOBase` 文件當中。 "
94
106
95
107
#: ../../library/io.rst:72 ../../library/io.rst:1110
96
108
msgid "Binary I/O"
@@ -110,11 +122,18 @@ msgid ""
110
122
"The easiest way to create a binary stream is with :meth:`open()` with "
111
123
"``'b'`` in the mode string::"
112
124
msgstr ""
125
+ "建立二進位資料串流最簡單的方法是使用 :meth:`open()`,並在 mode 字串中加入 "
126
+ "``'b'``:\n"
127
+ "\n"
128
+ "::"
113
129
114
130
#: ../../library/io.rst:85
115
131
msgid ""
116
132
"In-memory binary streams are also available as :class:`BytesIO` objects::"
117
133
msgstr ""
134
+ "記憶體內的二進位資料串流也可以透過 :class:`BytesIO` 物件來建立:\n"
135
+ "\n"
136
+ "::"
118
137
119
138
#: ../../library/io.rst:89
120
139
msgid ""
@@ -214,6 +233,9 @@ msgid ""
214
233
"`PYTHONWARNDEFAULTENCODING` environment variable, which will emit an :exc:"
215
234
"`EncodingWarning` when the default encoding is used."
216
235
msgstr ""
236
+ "要找出哪些地方使用到預設的地區編碼,你可以啟用 ``-X warn_default_encoding`` "
237
+ "命令列選項,或者設定環境變數 :envvar:`PYTHONWARNDEFAULTENCODING`。當使用到預"
238
+ "設編碼時,會引發 :exc:`EncodingWarning`。"
217
239
218
240
#: ../../library/io.rst:153
219
241
msgid ""
@@ -226,7 +248,7 @@ msgstr ""
226
248
227
249
#: ../../library/io.rst:162
228
250
msgid "High-level Module Interface"
229
- msgstr ""
251
+ msgstr "高階模組介面 "
230
252
231
253
#: ../../library/io.rst:166
232
254
msgid ""
@@ -237,7 +259,7 @@ msgstr ""
237
259
238
260
#: ../../library/io.rst:173
239
261
msgid "This is an alias for the builtin :func:`open` function."
240
- msgstr ""
262
+ msgstr "這是內建函式 :func:`open` 的別名。 "
241
263
242
264
#: ../../library/io.rst:175
243
265
msgid ""
@@ -259,10 +281,12 @@ msgid ""
259
281
"Opens the provided file with mode ``'rb'``. This function should be used "
260
282
"when the intent is to treat the contents as executable code."
261
283
msgstr ""
284
+ "以 ``'rb'`` 模式開啟提供的檔案。此函式應用於意圖將內容視為可執行的程式碼的情"
285
+ "況下。"
262
286
263
287
#: ../../library/io.rst:187
264
288
msgid "``path`` should be a :class:`str` and an absolute path."
265
- msgstr ""
289
+ msgstr "``path`` 應該要屬於 :class:`str` 類別,且是個絕對路徑。 "
266
290
267
291
#: ../../library/io.rst:189
268
292
msgid ""
0 commit comments