3
3
# This file is distributed under the same license as the Python package.
4
4
#
5
5
# Translators:
6
+ # Adrian Liaw <adrianliaw2000@gmail.com>, 2018
7
+ # Matt Wang <mattwang44@gmail.com>, 2021
8
+ #
6
9
msgid ""
7
10
msgstr ""
8
11
"Project-Id-Version : Python 3.10\n "
9
12
"Report-Msgid-Bugs-To : \n "
10
13
"POT-Creation-Date : 2021-09-13 00:11+0000\n "
11
- "PO-Revision-Date : 2018-05-23 16:05+0000 \n "
12
- "Last-Translator : Adrian Liaw <adrianliaw2000 @gmail.com>\n "
14
+ "PO-Revision-Date : 2021-12-15 12:53+0800 \n "
15
+ "Last-Translator : Matt Wang <mattwang44 @gmail.com>\n "
13
16
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
17
"tw)\n "
15
18
"Language : zh_TW\n "
16
19
"MIME-Version : 1.0\n "
17
20
"Content-Type : text/plain; charset=UTF-8\n "
18
21
"Content-Transfer-Encoding : 8bit\n "
19
22
"Plural-Forms : nplurals=1; plural=0;\n "
23
+ "X-Generator : Poedit 3.0.1\n "
20
24
21
25
#: ../../library/marshal.rst:2
22
26
msgid ":mod:`marshal` --- Internal Python object serialization"
23
- msgstr ""
27
+ msgstr ":mod:`marshal` --- 内部 Python 物件序列化 "
24
28
25
29
#: ../../library/marshal.rst:10
26
30
msgid ""
@@ -31,6 +35,10 @@ msgid ""
31
35
"are undocumented on purpose; it may change between Python versions (although "
32
36
"it rarely does). [#]_"
33
37
msgstr ""
38
+ "此 module(模組)包含一個能以二進位制格式來讀寫 Python 值的函式。這種格式是 "
39
+ "Python 專屬但獨立於機器架構的(例如,你可以在一臺 PC 上寫入某個 Python 值,再"
40
+ "將檔案傳到一臺 Sun 上並在那裡讀取它)。這種格式的細節是有意地不在文件上說明"
41
+ "的;它可能在不同 Python 版本中被改變(雖然這種情況極少發生)。\\ [#]_"
34
42
35
43
#: ../../library/marshal.rst:21
36
44
msgid ""
@@ -45,13 +53,22 @@ msgid ""
45
53
"guaranteed, and pickle supports a substantially wider range of objects than "
46
54
"marshal."
47
55
msgstr ""
56
+ "這不是一個通用「持續性 (persistence)」module 。關於通用持續性以及透過 RPC 呼"
57
+ "叫傳遞 Python 物件,請參閱 :mod:`pickle` 和 :mod:`shelve` 等 module 。\\ :"
58
+ "mod:`marshal` module 主要是為了支援用來讀寫「偽編譯 (pseudo-compiled)」 :"
59
+ "file:`.pyc` 檔案的 Python module。因此,Python 維護者保留了在必要時以不向後相"
60
+ "容的方式修改 marshal 格式的權利。如果你要序列化和反序列化 Python 物件,請改"
61
+ "用 :mod:`pickle` module -- 其執行效率相當、有保證版本獨立性,且實質上 "
62
+ "pickle 還支援比 marshal 更多樣的物件。"
48
63
49
64
#: ../../library/marshal.rst:33
50
65
msgid ""
51
66
"The :mod:`marshal` module is not intended to be secure against erroneous or "
52
67
"maliciously constructed data. Never unmarshal data received from an "
53
68
"untrusted or unauthenticated source."
54
69
msgstr ""
70
+ ":mod:`marshal` module 對於錯誤或惡意構建的資料來說是不安全的。永遠不要 "
71
+ "unmarshal 來自不受信任的或來源未經驗證的資料。"
55
72
56
73
#: ../../library/marshal.rst:39
57
74
msgid ""
@@ -67,22 +84,34 @@ msgid ""
67
84
"*version* lower than 3, recursive lists, sets and dictionaries cannot be "
68
85
"written (see below)."
69
86
msgstr ""
87
+ "不是所有 Python 物件型別都有支援;一般來說,此 module 只能寫入和讀取不依賴於"
88
+ "特定 Python 調用 (invocation) 的物件。下列型別是有支援的:布林 (boolean)、整"
89
+ "數、浮點數 (floating point number)、複數、字串、位元組串 (bytes)、位元組陣列 "
90
+ "(bytearray)、元組 (tuple)、list、集合 (set)、凍結集合 (frozenset)、"
91
+ "dictionary 和程式碼物件,需要了解的一點是元組、list、集合、凍結集合和 "
92
+ "dictionary 只在其所包含的值也屬於這些型別時才會支援。單例 (singleton) 物件 :"
93
+ "const:`None`\\ 、\\ :const:`Ellipsis` 和 :exc:`StopIteration` 也可以被 "
94
+ "marshal 和 unmarshal。對於 *version* 低於 3 的格式,遞迴 list、集合和 "
95
+ "dictionary 無法被寫入(見下文)。"
70
96
71
97
#: ../../library/marshal.rst:51
72
98
msgid ""
73
99
"There are functions that read/write files as well as functions operating on "
74
100
"bytes-like objects."
75
101
msgstr ""
102
+ "有些函式可以讀/寫檔案,還有些函式可以操作類位元組串物件 (bytes-like object)。"
76
103
77
104
#: ../../library/marshal.rst:54
78
105
msgid "The module defines these functions:"
79
- msgstr ""
106
+ msgstr "這個 module 定義了以下函式: "
80
107
81
108
#: ../../library/marshal.rst:59
82
109
msgid ""
83
110
"Write the value on the open file. The value must be a supported type. The "
84
111
"file must be a writeable :term:`binary file`."
85
112
msgstr ""
113
+ "將值寫入被開啟的檔案。值必須為受支援的型別,檔案必須為可寫入的 :term:`binary "
114
+ "file`。"
86
115
87
116
#: ../../library/marshal.rst:62
88
117
msgid ""
@@ -91,18 +120,23 @@ msgid ""
91
120
"written to the file. The object will not be properly read back by :func:"
92
121
"`load`."
93
122
msgstr ""
123
+ "如果值具有(或其所包含的物件具有)不支援的型別,則會引發 :exc:`ValueError` 例"
124
+ "外 --- 但是垃圾資料 (garbage data) 也將寫入檔案,物件也無法正確地透過 :func:"
125
+ "`load` 重新讀取。"
94
126
95
127
#: ../../library/marshal.rst:66
96
128
msgid ""
97
129
"The *version* argument indicates the data format that ``dump`` should use "
98
130
"(see below)."
99
- msgstr ""
131
+ msgstr "*version* 引數指明 ``dump`` 應該使用的資料格式(見下文)。 "
100
132
101
133
#: ../../library/marshal.rst:69 ../../library/marshal.rst:101
102
134
msgid ""
103
135
"Raises an :ref:`auditing event <auditing>` ``marshal.dumps`` with arguments "
104
136
"``value``, ``version``."
105
137
msgstr ""
138
+ "引發一個附帶引數 ``value`` 與 ``version`` 的\\ :ref:`稽核事件 (auditing "
139
+ "event) <auditing>` ``marshal.dumps``\\ 。"
106
140
107
141
#: ../../library/marshal.rst:74
108
142
msgid ""
@@ -111,60 +145,78 @@ msgid ""
111
145
"format), raise :exc:`EOFError`, :exc:`ValueError` or :exc:`TypeError`. The "
112
146
"file must be a readable :term:`binary file`."
113
147
msgstr ""
148
+ "從開啟的檔案讀取一個值並回傳。如果讀不到有效的值(例如,由於資料為不同 "
149
+ "Python 版本的不相容 marshal 格式),則會引發 :exc:`EOFError`\\ 、\\ :exc:"
150
+ "`ValueError` 或 :exc:`TypeError`。檔案必須為可讀取的 :term:`binary file`\\ 。"
114
151
115
152
#: ../../library/marshal.rst:79
116
153
msgid ""
117
154
"Raises an :ref:`auditing event <auditing>` ``marshal.load`` with no "
118
155
"arguments."
119
156
msgstr ""
157
+ "引發一個沒有附帶引數的\\ :ref:`稽核事件 <auditing>` ``marshal.load``\\ 。"
120
158
121
159
#: ../../library/marshal.rst:83
122
160
msgid ""
123
161
"If an object containing an unsupported type was marshalled with :func:"
124
162
"`dump`, :func:`load` will substitute ``None`` for the unmarshallable type."
125
163
msgstr ""
164
+ "如果透過 :func:`dump` marshal 了一個包含不支援型別的物件,\\ :func:`load` 會"
165
+ "將不可 marshal 的型別替換為 ``None``\\ 。"
126
166
127
167
#: ../../library/marshal.rst:88
128
168
msgid ""
129
169
"This call used to raise a ``code.__new__`` audit event for each code object. "
130
170
"Now it raises a single ``marshal.load`` event for the entire load operation."
131
171
msgstr ""
172
+ "使用此呼叫為每個程式碼物件引發一個 ``code.__new__`` 稽核事件。現在它會為整個"
173
+ "載入操作引發單個 ``marshal.load`` 事件。"
132
174
133
175
#: ../../library/marshal.rst:94
134
176
msgid ""
135
177
"Return the bytes object that would be written to a file by ``dump(value, "
136
178
"file)``. The value must be a supported type. Raise a :exc:`ValueError` "
137
179
"exception if value has (or contains an object that has) an unsupported type."
138
180
msgstr ""
181
+ "回傳將透過 ``dump(value, file)`` 來被寫入一個檔案的位元組串物件,其值必須是有"
182
+ "支援的型別,如果值(或其包含的任一物件)為不支援的型別則會引發 :exc:"
183
+ "`ValueError`\\ 。"
139
184
140
185
#: ../../library/marshal.rst:98
141
186
msgid ""
142
187
"The *version* argument indicates the data format that ``dumps`` should use "
143
188
"(see below)."
144
- msgstr ""
189
+ msgstr "*version* 引數指明 ``dumps`` 應當使用的資料型別(見下文)。 "
145
190
146
191
#: ../../library/marshal.rst:106
147
192
msgid ""
148
193
"Convert the :term:`bytes-like object` to a value. If no valid value is "
149
194
"found, raise :exc:`EOFError`, :exc:`ValueError` or :exc:`TypeError`. Extra "
150
195
"bytes in the input are ignored."
151
196
msgstr ""
197
+ "將 :term:`bytes-like object` 轉換為一個值。如果找不到有效的值,則會引發 :exc:"
198
+ "`EOFError`\\ 、\\ :exc:`ValueError` 或 :exc:`TypeError`\\ 。輸入中額外的位元"
199
+ "組串會被忽略。"
152
200
153
201
#: ../../library/marshal.rst:110
154
202
msgid ""
155
203
"Raises an :ref:`auditing event <auditing>` ``marshal.loads`` with argument "
156
204
"``bytes``."
157
205
msgstr ""
206
+ "引發一個附帶引數 ``bytes`` 的\\ :ref:`稽核事件 <auditing>` ``marshal.loads``"
207
+ "\\ 。"
158
208
159
209
#: ../../library/marshal.rst:114
160
210
msgid ""
161
211
"This call used to raise a ``code.__new__`` audit event for each code object. "
162
212
"Now it raises a single ``marshal.loads`` event for the entire load operation."
163
213
msgstr ""
214
+ "使用此呼叫為每個程式碼物件引發一個 ``code.__new__`` 稽核事件。現在它會為整個"
215
+ "載入操作引發單個 ``marshal.loads`` 事件。"
164
216
165
217
#: ../../library/marshal.rst:118
166
218
msgid "In addition, the following constants are defined:"
167
- msgstr ""
219
+ msgstr "此外,還定義了以下常數: "
168
220
169
221
#: ../../library/marshal.rst:122
170
222
msgid ""
@@ -173,6 +225,9 @@ msgid ""
173
225
"for floating point numbers. Version 3 adds support for object instancing and "
174
226
"recursion. The current version is 4."
175
227
msgstr ""
228
+ "表示 module 所使用的格式。第 0 版為歷史格式,第 1 版共享了駐留字串 (interned "
229
+ "string),第 2 版對浮點數使用二進位制格式。第 3 版添加了對於物件實例化和遞迴的"
230
+ "支援。目前使用的是第 4 版。"
176
231
177
232
#: ../../library/marshal.rst:130
178
233
msgid "Footnotes"
@@ -186,3 +241,7 @@ msgid ""
186
241
"marshal\" means to convert some data from internal to external form (in an "
187
242
"RPC buffer for instance) and \" unmarshalling\" for the reverse process."
188
243
msgstr ""
244
+ "此 module 的名稱來源於 Modula-3 (及其他語言) 的設計者所使用的術語,他們使用 "
245
+ "\" marshal\" 來表示自包含 (self-contained) 形式資料的傳輸。嚴格來說,將資料從"
246
+ "內部形式轉換為外部形式 (例如用於 RPC 緩衝區) 稱為 \" marshal\" ,而其反向過程則"
247
+ "稱為 \" unmarshal\" 。"
0 commit comments