Skip to content

Commit 7a5f8d0

Browse files
committed
Fixing translate
1 parent 3f9380b commit 7a5f8d0

File tree

1 file changed

+47
-45
lines changed

1 file changed

+47
-45
lines changed

c-api/tuple.po

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgstr ""
99
"Project-Id-Version: Python 3.14\n"
1010
"Report-Msgid-Bugs-To: \n"
1111
"POT-Creation-Date: 2025-11-05 00:16+0000\n"
12-
"PO-Revision-Date: 2017-09-22 18:26+0000\n"
12+
"PO-Revision-Date: 2025-11-13 21:53+0000\n"
1313
"Last-Translator: Yorkxe <karta25768@gmail.com>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1515
"tw)\n"
@@ -31,7 +31,7 @@ msgstr "此 :c:type:`PyObject` 子型別代表 Python 元組物件"
3131
msgid ""
3232
"This instance of :c:type:`PyTypeObject` represents the Python tuple type; it "
3333
"is the same object as :class:`tuple` in the Python layer."
34-
msgstr "此 :c:type:`PyTypeObject` 實例代表 Python 元組型別,與 Python layer 中的"
34+
msgstr "此 :c:type:`PyTypeObject` 實例代表 Python 元組型別,與 Python 層中的"
3535
" :class:`tuple` 是同一物件"
3636

3737
#: ../../c-api/tuple.rst:24
@@ -50,75 +50,77 @@ msgstr "如果 *p* 為一元組物件但不是元組型別的子型別實例時
5050
msgid ""
5151
"Return a new tuple object of size *len*, or ``NULL`` with an exception set "
5252
"on failure."
53-
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``"
53+
msgstr "回傳一個長度為 *len* 的新元組物件,失敗會時回傳 ``NULL`` 並設定例外。"
5454

5555
#: ../../c-api/tuple.rst:42
5656
msgid ""
5757
"Return a new tuple object of size *n*, or ``NULL`` with an exception set on "
5858
"failure. The tuple values are initialized to the subsequent *n* C arguments "
5959
"pointing to Python objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
6060
"``Py_BuildValue(\"(OO)\", a, b)``."
61-
msgstr "回傳一個長度為 *len* 的新元組物件,當例外發生時回傳 ``NULL``。元組值被初始化為"
62-
"指向 Python 物件的後續 *n* 個 C 參數。``PyTuple_Pack(2, a, b)`` 等價於"
61+
msgstr "回傳一個長度為 *n* 的新元組物件,失敗時會回傳 ``NULL`` 並設定例外。元組值被"
62+
"初始化為指向 Python 物件的接續 *n* 個 C 引數。``PyTuple_Pack(2, a, b)`` 等價於 "
6363
"``Py_BuildValue(\"(OO)\", a, b)``。"
6464

6565
#: ../../c-api/tuple.rst:50
6666
msgid ""
6767
"Take a pointer to a tuple object, and return the size of that tuple. On "
68-
"error, return ``-1`` and with an exception set."
69-
msgstr "拿取一個元組物件的指針,然後回傳此元組的大小。錯誤發生時,回傳 ``-1``。"
68+
"error, return ``-1`` with an exception set."
69+
msgstr "拿取一個元組物件的指標,然後回傳此元組的大小。錯誤發生時,回傳 ``-1`` "
70+
"並設定例外。"
7071

7172
#: ../../c-api/tuple.rst:56
7273
msgid "Like :c:func:`PyTuple_Size`, but without error checking."
73-
msgstr "就像 :c:func:`PyTuple_Size` 但沒有異常檢查。"
74+
msgstr "就像 :c:func:`PyTuple_Size` 但沒有錯誤檢查。"
7475

7576
#: ../../c-api/tuple.rst:61
7677
msgid ""
7778
"Return the object at position *pos* in the tuple pointed to by *p*. If "
7879
"*pos* is negative or out of bounds, return ``NULL`` and set "
7980
"an :exc:`IndexError` exception."
8081
msgstr "回傳 *p* 指向的元組中位置 *pos* 處的物件。如果 *pos* 為負數或超出範圍,回傳"
81-
" ``NULL`` 並拋出 :exc:`IndexError` 異常。"
82+
" ``NULL`` 並設定 :exc:`IndexError` 例外。"
8283

8384
#: ../../c-api/tuple.rst:64
8485
msgid ""
8586
"The returned reference is borrowed from the tuple *p* (that is: it is only "
8687
"valid as long as you hold a reference to *p*). To get a :term:`strong "
8788
"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` "
8889
"or :c:func:`PySequence_GetItem`."
89-
msgstr "傳回的參照借自元組 *p*(也就是說:它僅在您持有 *p* 的參照時有效)。"
90+
msgstr "回傳的參照借自元組 *p*\\ (也就是說:它僅在你持有 *p* 的參照時有效)。"
9091
"若要取得一個 :term:`strong reference`,請使用 :c:func:`Py_NewRef(PyTuple_GetItem(...)) "
9192
"<Py_NewRef>` 或 :c:func:`PySequence_GetItem`。"
9293

9394
#: ../../c-api/tuple.rst:73
9495
msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
95-
msgstr "與 :c:func:`PyTuple_GetItem` 相似,但不修改其引數。"
96+
msgstr "與 :c:func:`PyTuple_GetItem` 相似,但不檢查其引數。"
9697

9798
#: ../../c-api/tuple.rst:78
9899
msgid ""
99100
"Return the slice of the tuple pointed to by *p* between *low* and *high*, or "
100101
"``NULL`` with an exception set on failure."
101-
msgstr "回傳由 *p* 指向的元組中介於 *low* 和 *high* 之間的切片或回傳 ``NULL`` 並拋出異常。"
102+
msgstr "回傳由 *p* 指向的元組中介於 *low* 和 *high* 之間的切片或在錯誤時回傳 ``NULL``"
103+
" 並設定例外。"
102104

103105
#: ../../c-api/tuple.rst:81
104106
msgid ""
105107
"This is the equivalent of the Python expression ``p[low:high]``. Indexing "
106108
"from the end of the tuple is not supported."
107-
msgstr "這與 Python ``p[low:high]`` 表達式等價。但不支援從元組末端開始索引。"
109+
msgstr "這與 Python ``p[low:high]`` 運算式等價。但不支援從元組末端開始索引。"
108110

109111
#: ../../c-api/tuple.rst:87
110112
msgid ""
111113
"Insert a reference to object *o* at position *pos* of the tuple pointed to "
112114
"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
113115
"and set an :exc:`IndexError` exception."
114-
msgstr "於 *p* 指向的元組 *pos* 位置處插入對物件 *o* 的參照。如果 *pos* 超出邊界, "
115-
"回傳 ``-1``,並拋出 :exc:`IndexError` 異常。"
116+
msgstr "於 *p* 指向的元組 *pos* 位置處插入對物件 *o* 的參照。成功時回傳 ``0``,"
117+
"如果 *pos* 超出邊界則回傳 ``-1``,並設定 :exc:`IndexError` 例外。"
116118

117119
#: ../../c-api/tuple.rst:93
118120
msgid ""
119121
"This function \"steals\" a reference to *o* and discards a reference to an "
120122
"item already in the tuple at the affected position."
121-
msgstr "此函數 \"竊取\" 對 *o* 的參照,並丟棄對元組中受影響位置的項目的參照。"
123+
msgstr "此函式 \"竊取\" 對 *o* 的參照,並丟棄對元組中受影響位置的項目的參照。"
122124

123125
#: ../../c-api/tuple.rst:99
124126
msgid ""
@@ -134,7 +136,7 @@ msgid ""
134136
"in :ref:`debug mode <debug-build>` or :option:`with assertions <--with-"
135137
"assertions>`."
136138
msgstr "若 Python 以 :ref:`debug mode <debug-build>` 或 :option:`with assertions"
137-
" <--with-assertions>` 建構,則會進行邊界的斷言(asserting)檢查。"
139+
" <--with-assertions>` 建置,則會進行作為斷言(asserting)的邊界檢查。"
138140

139141
#: ../../c-api/tuple.rst:107
140142
msgid ""
@@ -143,14 +145,14 @@ msgid ""
143145
"that is being replaced; any reference in the tuple at position *pos* will be "
144146
"leaked."
145147
msgstr "此函式 \"竊取\" 對 *o* 的參照,且與 :c:func:`PyTuple_SetItem` 不同的是,"
146-
"此函式並不丟棄任何被替代項目的參照;元組中 *pos* 位置的所有參照皆會被洩漏。"
148+
"此函式並 *不* 丟棄任何被替代項目的參照;元組中 *pos* 位置的所有參照皆會被洩漏。"
147149

148150
#: ../../c-api/tuple.rst:114
149151
msgid ""
150152
"This macro should *only* be used on tuples that are newly created. Using "
151153
"this macro on a tuple that is already in use (or in other words, has a "
152154
"refcount > 1) could lead to undefined behavior."
153-
msgstr "此巨集 *僅* 套用於新建立的元組。在已使用的元組(或換句話說,引用計數大於 "
155+
msgstr "此巨集應 *僅* 用於新建立的元組。在正被使用中的元組(或換句話說,參照計數大於 "
154156
"1 的元組)上使用此巨集可能會導致未定義行為。"
155157

156158
#: ../../c-api/tuple.rst:121
@@ -169,49 +171,49 @@ msgid ""
169171
msgstr "可用於調整元組的大小。*newsize* 將是元組的新長度。由於元組 *應該* 是不可變的,"
170172
"因此僅當物件只有一個參照時才應使用此方法。如果程式碼的其他部分已經知道該元組,則 "
171173
"*不要* 使用此方法。最終元組總會變大或縮小。可以將其理解為銷毀舊元組並建立一個新元組,"
172-
"只是有著更高的效率。成功時回傳 ``0``。客戶端程式碼絕不應假設 ``*p`` 的結果值與呼叫此函數"
173-
"之前的值相同。如果 ``*p`` 參照的物件被替換,則原始的 ``*p`` 將被銷毀。失敗時,傳回 ``-1``,"
174-
"並將 ``*p`` 設定為 ``NULL``,並拋出 :exc:`MemoryError` 或 :exc:`SystemError` 例外。"
174+
"只是有著更高的效率。成功時回傳 ``0``。用戶端程式碼絕不應假設 ``*p`` 的結果值與呼叫此函數"
175+
"之前的值相同。如果 ``*p`` 參照的物件被替換,則原始的 ``*p`` 將被銷毀。失敗時,回傳 ``-1``,"
176+
"並將 ``*p`` 設定為 ``NULL``,並引發 :exc:`MemoryError` 或 :exc:`SystemError` 例外。"
175177

176178
#: ../../c-api/tuple.rst:136
177179
msgid "Struct Sequence Objects"
178-
msgstr "結構序列化物件"
180+
msgstr "結構序列物件"
179181

180182
#: ../../c-api/tuple.rst:138
181183
msgid ""
182184
"Struct sequence objects are the C equivalent "
183185
"of :func:`~collections.namedtuple` objects, i.e. a sequence whose items can "
184186
"also be accessed through attributes. To create a struct sequence, you first "
185187
"have to create a specific struct sequence type."
186-
msgstr "結構序列化物件與 C 語言中的 :func:`~collections.namedtuple` 物件等價,換言之,"
187-
"一個序列的元素也可以透過屬性存取。要建立結構體序列,首先需要建立特定類型的結構體型別。"
188+
msgstr "結構序列物件是 :func:`~collections.namedtuple` 物件在 C 語言中的等價,換言之,"
189+
"一個序列的元素也可以透過屬性存取。要建立結構序列,首先需要建立特定的結構序列型別。"
188190

189191
#: ../../c-api/tuple.rst:145
190192
msgid ""
191193
"Create a new struct sequence type from the data in *desc*, described below. "
192194
"Instances of the resulting type can be created "
193195
"with :c:func:`PyStructSequence_New`."
194-
msgstr "從 *desc* 的資料建立一個新的結構序列型別,如下所述。可以使用 "
195-
":c:func:`PyStructSequence_New` 建立結構序列型別實例。"
196+
msgstr "從 *desc* 中的資料建立一個新的結構序列型別,如下所述。可以使用 "
197+
":c:func:`PyStructSequence_New` 以建立產生結構序列型別的實例。"
196198

197199
#: ../../c-api/tuple.rst:148 ../../c-api/tuple.rst:217
198200
msgid "Return ``NULL`` with an exception set on failure."
199-
msgstr "失敗時回傳 ``NULL`` 並拋出例外。"
201+
msgstr "失敗時回傳 ``NULL`` 並設定例外。"
200202

201203
#: ../../c-api/tuple.rst:153
202204
msgid "Initializes a struct sequence type *type* from *desc* in place."
203-
msgstr "從 *desc* 就地初始化結構序列化型別 *type*。"
205+
msgstr "從 *desc* 原地(in place)初始化結構序列型別 *type*。"
204206

205207
#: ../../c-api/tuple.rst:158
206208
msgid ""
207209
"Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and "
208210
"``-1`` with an exception set on failure."
209211
msgstr "與 :c:func:`PyStructSequence_InitType` 相似,但運行成功時回傳 ``0``,"
210-
"運行失敗時回傳 ``-1`` 並拋出例外。"
212+
"運行失敗時回傳 ``-1`` 並設定例外。"
211213

212214
#: ../../c-api/tuple.rst:166
213215
msgid "Contains the meta information of a struct sequence type to create."
214-
msgstr "包含要建立的結構序列化型別的源資訊訊。"
216+
msgstr "包含要建立的結構序列化型別的中介資訊(meta information)。"
215217

216218
#: ../../c-api/tuple.rst:170
217219
msgid ""
@@ -222,15 +224,15 @@ msgstr "型別的完整限定名稱(Fully qualified name);以 UTF-8 編碼
222224

223225
#: ../../c-api/tuple.rst:175
224226
msgid "Pointer to docstring for the type or ``NULL`` to omit."
225-
msgstr "指向型別文件 (docstring) 的指針或使用 ``NULL`` 表示忽略。"
227+
msgstr "指向型別說明文件(docstring)的指標或使用 ``NULL`` 表示忽略。"
226228

227229
#: ../../c-api/tuple.rst:179
228230
msgid "Pointer to ``NULL``-terminated array with field names of the new type."
229-
msgstr "指向以 ``NULL`` 結尾的陣列指針包含新型別的欄位名稱。"
231+
msgstr "指向一個以 ``NULL`` 結尾的陣列指標,其包含新型別的欄位名稱。"
230232

231233
#: ../../c-api/tuple.rst:183
232234
msgid "Number of fields visible to the Python side (if used as tuple)."
233-
msgstr "Python 端可以看到欄位的數目 (如果使用元組)。"
235+
msgstr "Python 端可以看到欄位的數目(如果作為元組使用)。"
234236

235237
#: ../../c-api/tuple.rst:188
236238
msgid ""
@@ -239,9 +241,9 @@ msgid ""
239241
"the :c:member:`~PyStructSequence_Desc.fields` array of "
240242
"the :c:type:`PyStructSequence_Desc` determines which field of the struct "
241243
"sequence is described."
242-
msgstr "描述結構體序列的一個欄位。由於結構體序列以元組建構,所有欄位的型別均為 "
243-
":c:expr:`PyObject*`。 :c:type:`PyStructSequence_Desc` "
244-
":c:member:`~PyStructSequence_Desc.fields` 陣列中的索引決定了結構體序列的哪個欄位。"
244+
msgstr "描述結構序列的一個欄位。由於結構序列以元組作為原型,所有欄位的型別均為 "
245+
":c:expr:`PyObject*`。:c:type:`PyStructSequence_Desc` "
246+
":c:member:`~PyStructSequence_Desc.fields` 陣列中的索引決定了描述的是結構序列的哪個欄位。"
245247

246248
#: ../../c-api/tuple.rst:196
247249
msgid ""
@@ -252,15 +254,15 @@ msgstr "欄位名稱,或 ``NULL`` 表示命名欄位串列結束,設定為 "
252254

253255
#: ../../c-api/tuple.rst:201
254256
msgid "Field docstring or ``NULL`` to omit."
255-
msgstr "欄位文件或使用 ``NULL`` 表示忽略。"
257+
msgstr "欄位說明字串或為 ``NULL`` 表示忽略。"
256258

257259
#: ../../c-api/tuple.rst:206
258260
msgid "Special value for a field name to leave it unnamed."
259-
msgstr "特別的值給欄位名稱,表示該欄位不命名。"
261+
msgstr "給定欄位名稱一個特別值,表示該欄位不命名。"
260262

261263
#: ../../c-api/tuple.rst:208
262264
msgid "The type was changed from ``char *``."
263-
msgstr "型別已被 ``char *`` 修改。"
265+
msgstr "型別原本是 ``char *``,現已被修改。"
264266

265267
#: ../../c-api/tuple.rst:214
266268
msgid ""
@@ -271,23 +273,23 @@ msgstr "建立 *type* 的實例,必須以 :c:func:`PyStructSequence_NewType`
271273
#: ../../c-api/tuple.rst:222
272274
msgid ""
273275
"Return the object at position *pos* in the struct sequence pointed to by *p*."
274-
msgstr "回傳結構體序列中由 *p* 指向 *pos* 處的物件。"
276+
msgstr "回傳結構序列中由 *p* 指向 *pos* 處的物件。"
275277

276278
#: ../../c-api/tuple.rst:230
277279
msgid "Alias to :c:func:`PyStructSequence_GetItem`."
278280
msgstr ":c:func:`PyStructSequence_GetItem` 的別名。"
279281

280282
#: ../../c-api/tuple.rst:232
281283
msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`."
282-
msgstr "現在以 :c:func:`PyStructSequence_GetItem` 的別名型式實現。"
284+
msgstr "現在是被實作為 :c:func:`PyStructSequence_GetItem` 的一個別名。"
283285

284286
#: ../../c-api/tuple.rst:238
285287
msgid ""
286288
"Sets the field at index *pos* of the struct sequence *p* to value *o*. "
287289
"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand "
288290
"new instances."
289-
msgstr "將結構體序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
290-
":c:func:`PyTuple_SET_ITEM` 類似,此函數僅套用於填充全新實例。"
291+
msgstr "將結構序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
292+
":c:func:`PyTuple_SET_ITEM` 類似,此函式僅套用於填充全新實例。"
291293

292294
#: ../../c-api/tuple.rst:247
293295
msgid "This function \"steals\" a reference to *o*."
@@ -299,7 +301,7 @@ msgstr ":c:func:`PyStructSequence_SetItem` 的別名。"
299301

300302
#: ../../c-api/tuple.rst:254
301303
msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`."
302-
msgstr "現在以 :c:func:`PyStructSequence_SetItem` 的別名實現。"
304+
msgstr "現在是被實作為 :c:func:`PyStructSequence_SetItem` 的一個別名。"
303305

304306
#: ../../c-api/tuple.rst:8
305307
msgid "object"

0 commit comments

Comments
 (0)