1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) 2001-2022, Python Software Foundation
1
+ # Copyright (C) 2001-2023, Python Software Foundation
3
2
# This file is distributed under the same license as the Python package.
4
3
#
5
4
# Translators:
5
+ # Matt Wang <mattwang44@gmail.com>, 2023
6
6
msgid ""
7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.11\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
10
"POT-Creation-Date : 2021-10-26 16:47+0000\n "
11
- "PO-Revision-Date : 2016-11-19 00:26+0000 \n "
12
- "Last-Translator : Liang-Bo Wang <me@liang2.tw >\n "
11
+ "PO-Revision-Date : 2023-01-24 21:07+0800 \n "
12
+ "Last-Translator : Matt Wang <mattwang44@gmail.com >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
15
15
"Language : zh_TW\n "
16
16
"MIME-Version : 1.0\n "
17
17
"Content-Type : text/plain; charset=UTF-8\n "
18
18
"Content-Transfer-Encoding : 8bit\n "
19
19
"Plural-Forms : nplurals=1; plural=0;\n "
20
+ "X-Generator : Poedit 3.2.2\n "
20
21
21
22
#: ../../c-api/stable.rst:7
22
23
msgid "C API Stability"
23
- msgstr ""
24
+ msgstr "C API 穩定性 "
24
25
25
26
#: ../../c-api/stable.rst:9
26
27
msgid ""
@@ -30,6 +31,9 @@ msgid ""
30
31
"API. Changing existing API or removing API is only done after a deprecation "
31
32
"period or to fix serious issues."
32
33
msgstr ""
34
+ "Python 的 C API 被包含在向後相容性策略 :pep:`387` 中。雖然 C API 會隨著每個次"
35
+ "要版本(例如從 3.9 到 3.10)而變化,但大多數變化都是與原始碼相容的,通常只是"
36
+ "加入新的 API。更改現有 API 或刪除 API 僅在棄用期後或修復嚴重問題時進行。"
33
37
34
38
#: ../../c-api/stable.rst:15
35
39
msgid ""
@@ -39,16 +43,22 @@ msgid ""
39
43
"work on 3.10.8 and vice versa, but will need to be compiled separately for "
40
44
"3.9.x and 3.10.x."
41
45
msgstr ""
46
+ "CPython 的應用程式二進位介面 (Application Binary Interface, ABI) 在次要版本中"
47
+ "是向前和向後相容的(如果它們以相同的方式編譯;請參閱下面的\\ :ref:`stable-"
48
+ "abi-platform`\\ )。因此,為 Python 3.10.0 編譯的程式碼將能夠在 3.10.8 上運"
49
+ "行,反之亦然,但 3.9.x 和 3.10.x 就需要分別編譯。"
42
50
43
51
#: ../../c-api/stable.rst:21
44
52
msgid ""
45
53
"Names prefixed by an underscore, such as ``_Py_InternalState``, are private "
46
54
"API that can change without notice even in patch releases."
47
55
msgstr ""
56
+ "帶有底線前綴的名稱是私有 API (private API),像是 ``_Py_InternalState``,即使"
57
+ "在補丁版本 (patch release) 中也可能被更改,不會另行通知。"
48
58
49
59
#: ../../c-api/stable.rst:26
50
60
msgid "Stable Application Binary Interface"
51
- msgstr ""
61
+ msgstr "穩定的應用程式二進位介面 "
52
62
53
63
#: ../../c-api/stable.rst:28
54
64
msgid ""
@@ -57,6 +67,9 @@ msgid ""
57
67
"multiple versions of Python. Contents of the Limited API are :ref:`listed "
58
68
"below <stable-abi-list>`."
59
69
msgstr ""
70
+ "Python 3.2 引入了\\ *受限 API (Limited API)*,它是 Python C API 的一個子集。"
71
+ "僅使用受限 API 的擴充可以只編譯一次就使用於多個版本的 Python。受限 API 的內容"
72
+ "\\ :ref:`列在下方 <stable-abi-list>`。"
60
73
61
74
#: ../../c-api/stable.rst:33
62
75
msgid ""
@@ -65,19 +78,26 @@ msgid ""
65
78
"symbols exposed in the Limited API, but also other ones – for example, "
66
79
"functions necessary to support older versions of the Limited API."
67
80
msgstr ""
81
+ "為了實現它,Python 提供了一個\\ *穩定 ABI (Stable ABI)*:一組將在各個 Python "
82
+ "3.x 版本之間保持相容的符號。穩定 ABI 被包含在受限 API 中開放的符號,但也包含"
83
+ "其他符號 - 例如,支援舊版受限 API 所必需的函式。"
68
84
69
85
#: ../../c-api/stable.rst:38
70
86
msgid ""
71
87
"(For simplicity, this document talks about *extensions*, but the Limited API "
72
88
"and Stable ABI work the same way for all uses of the API – for example, "
73
89
"embedding Python.)"
74
90
msgstr ""
91
+ "(為簡單起見,本文件討論\\ *擴充 (extension)*,但受限 API 和穩定 ABI 在所有 "
92
+ "API 使用方式中都以相同的方式運作 -- 例如在嵌入式 Python (embedding Python) "
93
+ "中。)"
75
94
76
95
#: ../../c-api/stable.rst:44
77
96
msgid ""
78
97
"Define this macro before including ``Python.h`` to opt in to only use the "
79
98
"Limited API, and to select the Limited API version."
80
99
msgstr ""
100
+ "在包含 ``Python.h`` 之前定義此巨集以選擇只使用受限 API,並挑選受限 API 版本。"
81
101
82
102
#: ../../c-api/stable.rst:47
83
103
msgid ""
@@ -87,26 +107,36 @@ msgid ""
87
107
"the specified one onward, and can use Limited API introduced up to that "
88
108
"version."
89
109
msgstr ""
110
+ "將 ``Py_LIMITED_API`` 定義為對應於你的擴充有支援的最低 Python 版本的 :c:data:"
111
+ "`PY_VERSION_HEX` 值。該擴充無需重新編譯即可與從指定版本開始的所有 Python 3 版"
112
+ "本一起使用,並且可以使用過去版本有引入的受限 API。"
90
113
91
114
#: ../../c-api/stable.rst:53
92
115
msgid ""
93
116
"Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum "
94
117
"minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when "
95
118
"compiling with future Python versions."
96
119
msgstr ""
120
+ "與其直接使用 ``PY_VERSION_HEX`` 巨集,不如寫死 (hardcode) 最小次要版本(例如"
121
+ "代表 Python 3.10 的 ``0x030A0000``\\ ),以便在使用未來的 Python 版本進行編譯"
122
+ "時仍保持穩定性。"
97
123
98
124
#: ../../c-api/stable.rst:57
99
125
msgid ""
100
126
"You can also define ``Py_LIMITED_API`` to ``3``. This works the same as "
101
127
"``0x03020000`` (Python 3.2, the version that introduced Limited API)."
102
128
msgstr ""
129
+ "你還可以將 ``Py_LIMITED_API`` 定義為 ``3``,這與 ``0x03020000``\\ (Python "
130
+ "3.2,引入了受限 API 的版本)相同。"
103
131
104
132
#: ../../c-api/stable.rst:60
105
133
msgid ""
106
134
"On Windows, extensions that use the Stable ABI should be linked against "
107
135
"``python3.dll`` rather than a version-specific library such as ``python39."
108
136
"dll``."
109
137
msgstr ""
138
+ "在 Windows 上,使用穩定 ABI 的擴充應該連接到 ``python3.dll`` 而不是特定版本的"
139
+ "函式庫,例如 ``python39.dll``。"
110
140
111
141
#: ../../c-api/stable.rst:64
112
142
msgid ""
@@ -116,30 +146,40 @@ msgid ""
116
146
"to ensure that, for example, extensions built with the 3.10+ Limited API are "
117
147
"not installed for lower versions of Python."
118
148
msgstr ""
149
+ "在某些平台上,Python 將查找並加載以 ``abi3`` 標籤命名的共享函式庫檔案(例如 "
150
+ "``mymodule.abi3.so``\\ )。它不檢查此類擴充是否符合穩定的 ABI。確保的責任在使"
151
+ "用者(或者打包工具)身上,例如使用 3.10+ 受限 API 建置的擴充不會為較低版本的 "
152
+ "Python 所安裝。"
119
153
120
154
#: ../../c-api/stable.rst:71
121
155
msgid ""
122
156
"All functions in the Stable ABI are present as functions in Python's shared "
123
157
"library, not solely as macros. This makes them usable from languages that "
124
158
"don't use the C preprocessor."
125
159
msgstr ""
160
+ "穩定 ABI 中的所有函式都作為函式存在於 Python 的共享函式庫中,而不僅是作為巨"
161
+ "集。這使得它們可被用於不使用 C 預處理器 (preprocessor) 的語言。"
126
162
127
163
#: ../../c-api/stable.rst:77
128
164
msgid "Limited API Scope and Performance"
129
- msgstr ""
165
+ msgstr "受限 API 範圍和性能 "
130
166
131
167
#: ../../c-api/stable.rst:79
132
168
msgid ""
133
169
"The goal for the Limited API is to allow everything that is possible with "
134
170
"the full C API, but possibly with a performance penalty."
135
171
msgstr ""
172
+ "受限 API 的目標是允許使用完整的 C API 進行所有可能的操作,但可能會降低性能。"
136
173
137
174
#: ../../c-api/stable.rst:82
138
175
msgid ""
139
176
"For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro "
140
177
"variant :c:func:`PyList_GET_ITEM` is not. The macro can be faster because it "
141
178
"can rely on version-specific implementation details of the list object."
142
179
msgstr ""
180
+ "例如,雖然 :c:func:`PyList_GetItem` 可用,但它的「不安全」巨集變體 :c:func:"
181
+ "`PyList_GET_ITEM` 為不可用。巨集運行可以更快,因為它可以依賴 list 物件的特定"
182
+ "版本實作細節。"
143
183
144
184
#: ../../c-api/stable.rst:87
145
185
msgid ""
@@ -148,6 +188,9 @@ msgid ""
148
188
"allowing stability as Python's data structures are improved, but possibly "
149
189
"reducing performance."
150
190
msgstr ""
191
+ "如果沒有定義 ``Py_LIMITED_API``,一些 C API 函式將被嵌入或被替換為巨集。定義 "
192
+ "``Py_LIMITED_API`` 會禁用嵌入,從而隨著 Python 資料結構的改進而提高穩定性,但"
193
+ "可能會降低性能。"
151
194
152
195
#: ../../c-api/stable.rst:92
153
196
msgid ""
@@ -158,10 +201,14 @@ msgid ""
158
201
"where a version-specific one is not available – for example, for prereleases "
159
202
"of an upcoming Python version."
160
203
msgstr ""
204
+ "通過省略 ``Py_LIMITED_API`` 定義,可以使用特定版本的 ABI 編譯受限 API 擴充。"
205
+ "這可以提高該 Python 版本的性能,但會限制相容性。使用 ``Py_LIMITED_API`` 編譯"
206
+ "將產生一個擴充,可以在特定版本的擴充不可用的地方發布 — 例如,用於即將發布的 "
207
+ "Python 版本的預發布版本 (prerelease)。"
161
208
162
209
#: ../../c-api/stable.rst:101
163
210
msgid "Limited API Caveats"
164
- msgstr ""
211
+ msgstr "受限 API 注意事項 "
165
212
166
213
#: ../../c-api/stable.rst:103
167
214
msgid ""
@@ -170,6 +217,9 @@ msgid ""
170
217
"only covers definitions, but an API also includes other issues, such as "
171
218
"expected semantics."
172
219
msgstr ""
220
+ "請注意,使用 ``Py_LIMITED_API`` 進行編譯\\ *不*\\ 完全保證程式碼符合受限 API "
221
+ "或穩定 ABI。``Py_LIMITED_API`` 僅涵蓋定義,但 API 還包括其他問題,例如預期的"
222
+ "語義 (semantic)。"
173
223
174
224
#: ../../c-api/stable.rst:108
175
225
msgid ""
@@ -180,18 +230,26 @@ msgid ""
180
230
"the argument will be used directly, causing a ``NULL`` dereference and "
181
231
"crash. A similar argument works for fields of structs."
182
232
msgstr ""
233
+ "``Py_LIMITED_API`` 無法防範的一個問題是使用在較低 Python 版本中無效的引數來呼"
234
+ "叫函式。例如一個開始接受 ``NULL`` 作為引數的函式。在 Python 3.9 中,``NULL`` "
235
+ "現在代表選擇預設行為,但在 Python 3.8 中,引數將被直接使用,導致 ``NULL`` 取"
236
+ "消參照 (dereference) 且崩潰 (crash)。類似的引數適用於結構 (struct) 的欄位。"
183
237
184
238
#: ../../c-api/stable.rst:115
185
239
msgid ""
186
240
"Another issue is that some struct fields are currently not hidden when "
187
241
"``Py_LIMITED_API`` is defined, even though they're part of the Limited API."
188
242
msgstr ""
243
+ "另一個問題是,當有定義 ``Py_LIMITED_API`` 時,一些結構欄位目前不會被隱藏,即"
244
+ "使它們是受限 API 的一部分。"
189
245
190
246
#: ../../c-api/stable.rst:118
191
247
msgid ""
192
248
"For these reasons, we recommend testing an extension with *all* minor Python "
193
249
"versions it supports, and preferably to build with the *lowest* such version."
194
250
msgstr ""
251
+ "出於這些原因,我們建議要以它支援的\\ *所有*\\ 次要 Python 版本來測試擴充,並"
252
+ "且最好使用\\ *最低*\\ 版本進行建置。"
195
253
196
254
#: ../../c-api/stable.rst:121
197
255
msgid ""
@@ -200,6 +258,9 @@ msgid ""
200
258
"few private declarations are exposed for technical reasons (or even "
201
259
"unintentionally, as bugs)."
202
260
msgstr ""
261
+ "我們也建議要查看所有使用過的 API 的文件,檢查它是否明確屬於受限 API。即使有定"
262
+ "義 ``Py_LIMITED_API``,一些私有聲明也會因為技術原因(或者甚至是無意地,例如臭"
263
+ "蟲)而被公開出來。"
203
264
204
265
#: ../../c-api/stable.rst:126
205
266
msgid ""
@@ -209,10 +270,13 @@ msgid ""
209
270
"particular, parts of the Limited API may be deprecated and removed, provided "
210
271
"that the Stable ABI stays stable."
211
272
msgstr ""
273
+ "另請注意,受限 API 不一定是穩定的:在 Python 3.8 中使用 ``Py_LIMITED_API`` 進"
274
+ "行編譯意味著擴充將能以 Python 3.12 運行,但不一定能以 Python 3.12 *編譯*。特"
275
+ "別是如果穩定 ABI 保持穩定,部分受限 API 可能會被棄用和刪除。"
212
276
213
277
#: ../../c-api/stable.rst:136
214
278
msgid "Platform Considerations"
215
- msgstr ""
279
+ msgstr "平台注意事項 "
216
280
217
281
#: ../../c-api/stable.rst:138
218
282
msgid ""
@@ -221,6 +285,9 @@ msgid ""
221
285
"ABI, these details define a “platform”. They usually depend on the OS type "
222
286
"and processor architecture"
223
287
msgstr ""
288
+ "ABI 穩定性不僅取決於 Python,還取決於使用的編譯器、低階函式庫和編譯器選項。出"
289
+ "於穩定 ABI 的目的,這些細節定義了一個「平台」。它們通常取決於作業系統種類和處"
290
+ "理器架構"
224
291
225
292
#: ../../c-api/stable.rst:143
226
293
msgid ""
@@ -229,11 +296,14 @@ msgid ""
229
296
"does not break the Stable ABI. This is the case with Windows and macOS "
230
297
"releases from ``python.org`` and many third-party distributors."
231
298
msgstr ""
299
+ "每個特定的 Python 發布者都有責任確保特定平台上的所有 Python 版本都以不破壞穩"
300
+ "定 ABI 的方式建置。``python.org`` 和許多第三方發布者發布的 Windows 和 macOS "
301
+ "版本就是這種情況。"
232
302
233
303
#: ../../c-api/stable.rst:153
234
304
msgid "Contents of Limited API"
235
- msgstr ""
305
+ msgstr "受限 API 的內容 "
236
306
237
307
#: ../../c-api/stable.rst:156
238
308
msgid "Currently, the Limited API includes the following items:"
239
- msgstr ""
309
+ msgstr "目前,受限 API 包括以下項目: "
0 commit comments