@@ -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-07-22 00:04+0000\n "
10
- "PO-Revision-Date : 2023-07-17 17:38 +0800\n "
10
+ "PO-Revision-Date : 2023-07-31 18:24 +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 "
@@ -39,6 +39,11 @@ msgid ""
39
39
"any of these categories is called a :term:`file object`. Other common terms "
40
40
"are *stream* and *file-like object*."
41
41
msgstr ""
42
+ ":mod:`io` 模組替 Python 提供處理各種類型 IO 的主要工具。有三種主要的 IO 類"
43
+ "型: *文字 I/O (text I/O)*、*二進位 I/O (binary I/O)* 以及\\ *原始 I/O (raw "
44
+ "I/O)*。這些均為泛用 (generic) 類型,且每種類型都可以使用各式後端儲存 "
45
+ "(backing store)。任一種屬於這些類型的具體物件稱為 :term:`file object`。其它常"
46
+ "見的名詞還有\\ *資料串流 (stream)* 以及\\ *類檔案物件 (file-like objects)*。"
42
47
43
48
#: ../../library/io.rst:34
44
49
msgid ""
@@ -48,6 +53,9 @@ msgid ""
48
53
"location), or only sequential access (for example in the case of a socket or "
49
54
"pipe)."
50
55
msgstr ""
56
+ "無論其類型為何,每個具體的資料串流物件也將具有各種能力:唯讀的、只接受寫入"
57
+ "的、或者讀寫兼具的。它還允許任意的隨機存取(向前或向後尋找至任意位置),或者"
58
+ "只能依順序存取(例如 socket 或 pipe 的情形下)。"
51
59
52
60
#: ../../library/io.rst:40
53
61
msgid ""
@@ -58,16 +66,16 @@ msgid ""
58
66
msgstr ""
59
67
"所有的資料串流都會謹慎處理你所提供的資料的型別。舉例來說,提供一個 :class:"
60
68
"`str` 物件給二進位資料串流的 ``write()`` 方法將會引發 :exc:`TypeError`。同樣"
61
- "地,若提供一個 :class:`bytes` 物件給文字資料串流的 ``write()`` 方法,也會引發同 "
62
- "樣的錯誤 。"
69
+ "地,若提供一個 :class:`bytes` 物件給文字資料串流的 ``write()`` 方法,也會引發 "
70
+ "同樣的錯誤 。"
63
71
64
72
#: ../../library/io.rst:45
65
73
msgid ""
66
74
"Operations that used to raise :exc:`IOError` now raise :exc:`OSError`, "
67
75
"since :exc:`IOError` is now an alias of :exc:`OSError`."
68
76
msgstr ""
69
- "原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :"
70
- "exc: `IOError` 現在是 :exc:`OSError` 的別名。"
77
+ "原本會引發 :exc:`IOError` 的操作,現在將改成引發 :exc:`OSError`。因為 :exc: "
78
+ "`IOError` 現在是 :exc:`OSError` 的別名。"
71
79
72
80
#: ../../library/io.rst:51 ../../library/io.rst:855 ../../library/io.rst:1122
73
81
msgid "Text I/O"
@@ -80,6 +88,9 @@ msgid ""
80
88
"a file), encoding and decoding of data is made transparently as well as "
81
89
"optional translation of platform-specific newline characters."
82
90
msgstr ""
91
+ "文字 I/O 要求和產出 :class:`str` 物件。這意味著每當後端儲存為原生 bytes 時"
92
+ "(例如在檔案的情形下),資料的編碼與解碼會以清楚易懂的方式進行,也可選擇同時"
93
+ "轉換特定於平台的換行字元。"
83
94
84
95
#: ../../library/io.rst:58
85
96
msgid ""
@@ -116,6 +127,10 @@ msgid ""
116
127
"be used for all kinds of non-text data, and also when manual control over "
117
128
"the handling of text data is desired."
118
129
msgstr ""
130
+ "二進位 I/O(也稱為\\ *緩衝 I/O (buffered I/O)*)要求的是\\ :term:`類位元組物"
131
+ "件 (bytes-like objects) <bytes-like object>` 且產生 :class:`bytes` 物件。不進"
132
+ "行編碼、解碼或者換行字元轉換。這種類型的資料串流可用於各種非文字資料,以及需"
133
+ "要手動控制對文字資料的處理時。"
119
134
120
135
#: ../../library/io.rst:80
121
136
msgid ""
@@ -160,6 +175,12 @@ msgid ""
160
175
"manipulate a raw stream from user code. Nevertheless, you can create a raw "
161
176
"stream by opening a file in binary mode with buffering disabled::"
162
177
msgstr ""
178
+ "原始 I/O(也稱為\\ *無緩衝 I/O (unbuffered I/O)*)通常作為二進位以及文字資料"
179
+ "串流的低階 building-block 使用;在使用者程式碼中直接操作原始資料串流很少有"
180
+ "用。然而,你可以透過以無緩衝的二進位模式開啟一個檔案來建立一個原始資料串"
181
+ "流:\n"
182
+ "\n"
183
+ "::"
163
184
164
185
#: ../../library/io.rst:106
165
186
msgid ""
@@ -302,6 +323,8 @@ msgid ""
302
323
"This is a helper function for callables that use :func:`open` or :class:"
303
324
"`TextIOWrapper` and have an ``encoding=None`` parameter."
304
325
msgstr ""
326
+ "這是個輔助函數,適用於使用 :func:`open` 或 :class:`TextIOWrapper` 且具有 "
327
+ "``encoding=None`` 參數的可呼叫物件。"
305
328
306
329
#: ../../library/io.rst:203
307
330
msgid ""
0 commit comments