33#
44# Translators:
55# Leon H., 2017
6- # Yorkxe <karta25768@gmail.com>, 2025
6+ # Yorkxe <karta25768@gmail.com>, 2025
77msgid ""
88msgstr ""
99"Project-Id-Version : Python 3.14\n "
@@ -31,20 +31,24 @@ msgstr "此 :c:type:`PyObject` 子型別代表 Python 元組物件"
3131msgid ""
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 層中的"
35- " :class:`tuple` 是同一物件"
34+ msgstr ""
35+ "此 :c:type:`PyTypeObject` 實例代表 Python 元組型別,與 Python 層中的 :class:"
36+ "`tuple` 是同一物件"
3637
3738#: ../../c-api/tuple.rst:24
3839msgid ""
3940"Return true if *p* is a tuple object or an instance of a subtype of the "
4041"tuple type. This function always succeeds."
41- msgstr "如果 *p* 為一元組物件或是元組型別的子型別實例時回傳 true。此函式總會執行成功"
42+ msgstr ""
43+ "如果 *p* 為一元組物件或是元組型別的子型別實例時回傳 true。此函式總會執行成功"
4244
4345#: ../../c-api/tuple.rst:30
4446msgid ""
4547"Return true if *p* is a tuple object, but not an instance of a subtype of "
4648"the tuple type. This function always succeeds."
47- msgstr "如果 *p* 為一元組物件但不是元組型別的子型別實例時回傳 true。此函式總會執行成功"
49+ msgstr ""
50+ "如果 *p* 為一元組物件但不是元組型別的子型別實例時回傳 true。此函式總會執行成"
51+ "功"
4852
4953#: ../../c-api/tuple.rst:36
5054msgid ""
@@ -58,16 +62,18 @@ msgid ""
5862"failure. The tuple values are initialized to the subsequent *n* C arguments "
5963"pointing to Python objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
6064"``Py_BuildValue(\" (OO)\" , a, b)``."
61- msgstr "回傳一個長度為 *n* 的新元組物件,失敗時會回傳 ``NULL`` 並設定例外。元組值被"
62- "初始化為指向 Python 物件的接續 *n* 個 C 引數。``PyTuple_Pack(2, a, b)`` 等價於 "
65+ msgstr ""
66+ "回傳一個長度為 *n* 的新元組物件,失敗時會回傳 ``NULL`` 並設定例外。元組值被初"
67+ "始化為指向 Python 物件的接續 *n* 個 C 引數。``PyTuple_Pack(2, a, b)`` 等價於 "
6368"``Py_BuildValue(\" (OO)\" , a, b)``。"
6469
6570#: ../../c-api/tuple.rst:50
6671msgid ""
6772"Take a pointer to a tuple object, and return the size of that tuple. On "
6873"error, return ``-1`` with an exception set."
69- msgstr "拿取一個元組物件的指標,然後回傳此元組的大小。錯誤發生時,回傳 ``-1`` "
70- "並設定例外。"
74+ msgstr ""
75+ "拿取一個元組物件的指標,然後回傳此元組的大小。錯誤發生時,回傳 ``-1`` 並設定"
76+ "例外。"
7177
7278#: ../../c-api/tuple.rst:56
7379msgid "Like :c:func:`PyTuple_Size`, but without error checking."
@@ -76,20 +82,23 @@ msgstr "就像 :c:func:`PyTuple_Size` 但沒有錯誤檢查。"
7682#: ../../c-api/tuple.rst:61
7783msgid ""
7884"Return the object at position *pos* in the tuple pointed to by *p*. If "
79- "*pos* is negative or out of bounds, return ``NULL`` and set "
80- "an :exc:`IndexError` exception."
81- msgstr "回傳 *p* 指向的元組中位置 *pos* 處的物件。如果 *pos* 為負數或超出範圍,回傳"
82- " ``NULL`` 並設定 :exc:`IndexError` 例外。"
85+ "*pos* is negative or out of bounds, return ``NULL`` and set an :exc:"
86+ "`IndexError` exception."
87+ msgstr ""
88+ "回傳 *p* 指向的元組中位置 *pos* 處的物件。如果 *pos* 為負數或超出範圍,回傳 "
89+ "``NULL`` 並設定 :exc:`IndexError` 例外。"
8390
8491#: ../../c-api/tuple.rst:64
8592msgid ""
8693"The returned reference is borrowed from the tuple *p* (that is: it is only "
8794"valid as long as you hold a reference to *p*). To get a :term:`strong "
88- "reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` "
89- "or :c:func:`PySequence_GetItem`."
90- msgstr "回傳的參照借自元組 *p*\\ (也就是說:它僅在你持有 *p* 的參照時有效)。"
91- "若要取得一個 :term:`strong reference`,請使用 :c:func:`Py_NewRef(PyTuple_GetItem(...)) "
92- "<Py_NewRef>` 或 :c:func:`PySequence_GetItem`。"
95+ "reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` or :c:"
96+ "func:`PySequence_GetItem`."
97+ msgstr ""
98+ "回傳的參照借自元組 *p*\\ (也就是說:它僅在你持有 *p* 的參照時有效)。若要取"
99+ "得一個 :term:`strong reference`,請使用 :c:func:"
100+ "`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` 或 :c:func:"
101+ "`PySequence_GetItem`。"
93102
94103#: ../../c-api/tuple.rst:73
95104msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
@@ -99,8 +108,9 @@ msgstr "與 :c:func:`PyTuple_GetItem` 相似,但不檢查其引數。"
99108msgid ""
100109"Return the slice of the tuple pointed to by *p* between *low* and *high*, or "
101110"``NULL`` with an exception set on failure."
102- msgstr "回傳由 *p* 指向的元組中介於 *low* 和 *high* 之間的切片或在錯誤時回傳 ``NULL``"
103- " 並設定例外。"
111+ msgstr ""
112+ "回傳由 *p* 指向的元組中介於 *low* 和 *high* 之間的切片或在錯誤時回傳 "
113+ "``NULL`` 並設定例外。"
104114
105115#: ../../c-api/tuple.rst:81
106116msgid ""
@@ -113,8 +123,9 @@ msgid ""
113123"Insert a reference to object *o* at position *pos* of the tuple pointed to "
114124"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
115125"and set an :exc:`IndexError` exception."
116- msgstr "於 *p* 指向的元組 *pos* 位置處插入對物件 *o* 的參照。成功時回傳 ``0``,"
117- "如果 *pos* 超出邊界則回傳 ``-1``,並設定 :exc:`IndexError` 例外。"
126+ msgstr ""
127+ "於 *p* 指向的元組 *pos* 位置處插入對物件 *o* 的參照。成功時回傳 ``0``,如果 "
128+ "*pos* 超出邊界則回傳 ``-1``,並設定 :exc:`IndexError` 例外。"
118129
119130#: ../../c-api/tuple.rst:93
120131msgid ""
@@ -126,33 +137,35 @@ msgstr "此函式 \"竊取\" 對 *o* 的參照,並丟棄對元組中受影響
126137msgid ""
127138"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
128139"*only* be used to fill in brand new tuples."
129- msgstr "與 :c:func:`PyTuple_SetItem` 相似,但不進行錯誤檢查,且應 *只* "
130- "用於填充全新的元組。"
140+ msgstr ""
141+ "與 :c:func:`PyTuple_SetItem` 相似,但不進行錯誤檢查,且應 *只* 用於填充全新的"
142+ "元組。"
131143
132144#: ../../c-api/tuple.rst:102 ../../c-api/tuple.rst:224
133145#: ../../c-api/tuple.rst:242
134146msgid ""
135- "Bounds checking is performed as an assertion if Python is built "
136- "in :ref: `debug mode <debug-build>` or :option:`with assertions <--with-"
137- "assertions>`. "
138- msgstr "若 Python 以 :ref:`debug mode <debug-build>` 或 :option:`with assertions"
139- " <-- with-assertions>` 建置,則會進行作為斷言(asserting)的邊界檢查。"
147+ "Bounds checking is performed as an assertion if Python is built in :ref: "
148+ "`debug mode <debug-build>` or :option:`with assertions <--with-assertions>`. "
149+ msgstr " "
150+ "若 Python 以 :ref:`debug mode <debug-build>` 或 :option:`with assertions <-- "
151+ "with-assertions>` 建置,則會進行作為斷言(asserting)的邊界檢查。"
140152
141153#: ../../c-api/tuple.rst:107
142154msgid ""
143- "This function \" steals\" a reference to *o*, and, "
144- "unlike :c:func: `PyTuple_SetItem`, does *not* discard a reference to any item "
145- "that is being replaced; any reference in the tuple at position *pos* will be "
146- "leaked. "
147- msgstr "此函式 \" 竊取\" 對 *o* 的參照,且與 :c:func:`PyTuple_SetItem` 不同的是,"
148- "此函式並 *不* 丟棄任何被替代項目的參照;元組中 *pos* 位置的所有參照皆會被洩漏。"
155+ "This function \" steals\" a reference to *o*, and, unlike :c:func: "
156+ "`PyTuple_SetItem`, does *not* discard a reference to any item that is being "
157+ "replaced; any reference in the tuple at position *pos* will be leaked. "
158+ msgstr " "
159+ "此函式 \" 竊取\" 對 *o* 的參照,且與 :c:func:`PyTuple_SetItem` 不同的是,此函 "
160+ "式並 *不* 丟棄任何被替代項目的參照;元組中 *pos* 位置的所有參照皆會被洩漏。"
149161
150162#: ../../c-api/tuple.rst:114
151163msgid ""
152164"This macro should *only* be used on tuples that are newly created. Using "
153165"this macro on a tuple that is already in use (or in other words, has a "
154166"refcount > 1) could lead to undefined behavior."
155- msgstr "此巨集應 *僅* 用於新建立的元組。在正被使用中的元組(或換句話說,參照計數大於 "
167+ msgstr ""
168+ "此巨集應 *僅* 用於新建立的元組。在正被使用中的元組(或換句話說,參照計數大於 "
156169"1 的元組)上使用此巨集可能會導致未定義行為。"
157170
158171#: ../../c-api/tuple.rst:121
@@ -166,35 +179,40 @@ msgid ""
166179"Client code should never assume that the resulting value of ``*p`` will be "
167180"the same as before calling this function. If the object referenced by ``*p`` "
168181"is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` "
169- "and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` "
170- "or :exc:`SystemError`."
171- msgstr "可用於調整元組的大小。*newsize* 將是元組的新長度。由於元組 *應該* 是不可變的,"
172- "因此僅當物件只有一個參照時才應使用此方法。如果程式碼的其他部分已經知道該元組,則 "
173- "*不要* 使用此方法。最終元組總會變大或縮小。可以將其理解為銷毀舊元組並建立一個新元組,"
174- "只是有著更高的效率。成功時回傳 ``0``。用戶端程式碼絕不應假設 ``*p`` 的結果值與呼叫此函數"
175- "之前的值相同。如果 ``*p`` 參照的物件被替換,則原始的 ``*p`` 將被銷毀。失敗時,回傳 ``-1``,"
176- "並將 ``*p`` 設定為 ``NULL``,並引發 :exc:`MemoryError` 或 :exc:`SystemError` 例外。"
182+ "and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or :exc:"
183+ "`SystemError`."
184+ msgstr ""
185+ "可用於調整元組的大小。*newsize* 將是元組的新長度。由於元組 *應該* 是不可變"
186+ "的,因此僅當物件只有一個參照時才應使用此方法。如果程式碼的其他部分已經知道該"
187+ "元組,則 *不要* 使用此方法。最終元組總會變大或縮小。可以將其理解為銷毀舊元組"
188+ "並建立一個新元組,只是有著更高的效率。成功時回傳 ``0``。用戶端程式碼絕不應假"
189+ "設 ``*p`` 的結果值與呼叫此函數之前的值相同。如果 ``*p`` 參照的物件被替換,則"
190+ "原始的 ``*p`` 將被銷毀。失敗時,回傳 ``-1``,並將 ``*p`` 設定為 ``NULL``,並"
191+ "引發 :exc:`MemoryError` 或 :exc:`SystemError` 例外。"
177192
178193#: ../../c-api/tuple.rst:136
179194msgid "Struct Sequence Objects"
180195msgstr "結構序列物件"
181196
182197#: ../../c-api/tuple.rst:138
183198msgid ""
184- "Struct sequence objects are the C equivalent "
185- "of :func:`~collections.namedtuple` objects, i.e. a sequence whose items can "
186- "also be accessed through attributes. To create a struct sequence, you first "
187- "have to create a specific struct sequence type."
188- msgstr "結構序列物件是 :func:`~collections.namedtuple` 物件在 C 語言中的等價,換言之,"
189- "一個序列的元素也可以透過屬性存取。要建立結構序列,首先需要建立特定的結構序列型別。"
199+ "Struct sequence objects are the C equivalent of :func:`~collections."
200+ "namedtuple` objects, i.e. a sequence whose items can also be accessed "
201+ "through attributes. To create a struct sequence, you first have to create a "
202+ "specific struct sequence type."
203+ msgstr ""
204+ "結構序列物件是 :func:`~collections.namedtuple` 物件在 C 語言中的等價,換言"
205+ "之,一個序列的元素也可以透過屬性存取。要建立結構序列,首先需要建立特定的結構"
206+ "序列型別。"
190207
191208#: ../../c-api/tuple.rst:145
192209msgid ""
193210"Create a new struct sequence type from the data in *desc*, described below. "
194- "Instances of the resulting type can be created "
195- "with :c:func:`PyStructSequence_New`."
196- msgstr "從 *desc* 中的資料建立一個新的結構序列型別,如下所述。可以使用 "
197- ":c:func:`PyStructSequence_New` 以建立產生結構序列型別的實例。"
211+ "Instances of the resulting type can be created with :c:func:"
212+ "`PyStructSequence_New`."
213+ msgstr ""
214+ "從 *desc* 中的資料建立一個新的結構序列型別,如下所述。可以使用 :c:func:"
215+ "`PyStructSequence_New` 以建立產生結構序列型別的實例。"
198216
199217#: ../../c-api/tuple.rst:148 ../../c-api/tuple.rst:217
200218msgid "Return ``NULL`` with an exception set on failure."
@@ -208,8 +226,9 @@ msgstr "從 *desc* 原地(in place)初始化結構序列型別 *type*。"
208226msgid ""
209227"Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and "
210228"``-1`` with an exception set on failure."
211- msgstr "與 :c:func:`PyStructSequence_InitType` 相似,但運行成功時回傳 ``0``,"
212- "運行失敗時回傳 ``-1`` 並設定例外。"
229+ msgstr ""
230+ "與 :c:func:`PyStructSequence_InitType` 相似,但運行成功時回傳 ``0``,運行失敗"
231+ "時回傳 ``-1`` 並設定例外。"
213232
214233#: ../../c-api/tuple.rst:166
215234msgid "Contains the meta information of a struct sequence type to create."
@@ -219,8 +238,9 @@ msgstr "包含要建立的結構序列化型別的中介資訊(meta informatio
219238msgid ""
220239"Fully qualified name of the type; null-terminated UTF-8 encoded. The name "
221240"must contain the module name."
222- msgstr "型別的完整限定名稱(Fully qualified name);以 UTF-8 編碼並以空字元結尾。"
223- "名稱必須包含完整的模組名稱。"
241+ msgstr ""
242+ "型別的完整限定名稱(Fully qualified name);以 UTF-8 編碼並以空字元結尾。名稱"
243+ "必須包含完整的模組名稱。"
224244
225245#: ../../c-api/tuple.rst:175
226246msgid "Pointer to docstring for the type or ``NULL`` to omit."
@@ -237,20 +257,23 @@ msgstr "Python 端可以看到欄位的數目(如果作為元組使用)。"
237257#: ../../c-api/tuple.rst:188
238258msgid ""
239259"Describes a field of a struct sequence. As a struct sequence is modeled as a "
240- "tuple, all fields are typed as :c:expr:`PyObject*`. The index in "
241- "the :c:member:`~PyStructSequence_Desc.fields` array of "
242- "the :c:type:`PyStructSequence_Desc` determines which field of the struct "
243- "sequence is described."
244- msgstr "描述結構序列的一個欄位。由於結構序列以元組作為原型,所有欄位的型別均為 "
245- ":c:expr:`PyObject*`。:c:type:`PyStructSequence_Desc` 在 "
246- ":c:member:`~PyStructSequence_Desc.fields` 陣列中的索引決定了描述的是結構序列的哪個欄位。"
260+ "tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:"
261+ "member:`~PyStructSequence_Desc.fields` array of the :c:type:"
262+ "`PyStructSequence_Desc` determines which field of the struct sequence is "
263+ "described."
264+ msgstr ""
265+ "描述結構序列的一個欄位。由於結構序列以元組作為原型,所有欄位的型別均為 :c:"
266+ "expr:`PyObject*`。:c:type:`PyStructSequence_Desc` 在 :c:member:"
267+ "`~PyStructSequence_Desc.fields` 陣列中的索引決定了描述的是結構序列的哪個欄"
268+ "位。"
247269
248270#: ../../c-api/tuple.rst:196
249271msgid ""
250- "Name for the field or ``NULL`` to end the list of named fields, set "
251- "to :c:data:`PyStructSequence_UnnamedField` to leave unnamed."
252- msgstr "欄位名稱,或 ``NULL`` 表示命名欄位串列結束,設定為 "
253- ":c:data:`PyStructSequence_UnnamedField` 表示該欄位不命名。"
272+ "Name for the field or ``NULL`` to end the list of named fields, set to :c:"
273+ "data:`PyStructSequence_UnnamedField` to leave unnamed."
274+ msgstr ""
275+ "欄位名稱,或 ``NULL`` 表示命名欄位串列結束,設定為 :c:data:"
276+ "`PyStructSequence_UnnamedField` 表示該欄位不命名。"
254277
255278#: ../../c-api/tuple.rst:201
256279msgid "Field docstring or ``NULL`` to omit."
@@ -266,8 +289,8 @@ msgstr "型別原本是 ``char *``,現已被修改。"
266289
267290#: ../../c-api/tuple.rst:214
268291msgid ""
269- "Creates an instance of *type*, which must have been created "
270- "with :c:func: `PyStructSequence_NewType`."
292+ "Creates an instance of *type*, which must have been created with :c:func: "
293+ "`PyStructSequence_NewType`."
271294msgstr "建立 *type* 的實例,必須以 :c:func:`PyStructSequence_NewType` 建立。"
272295
273296#: ../../c-api/tuple.rst:222
@@ -288,8 +311,9 @@ msgid ""
288311"Sets the field at index *pos* of the struct sequence *p* to value *o*. "
289312"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand "
290313"new instances."
291- msgstr "將結構序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 "
292- ":c:func:`PyTuple_SET_ITEM` 類似,此函式僅套用於填充全新實例。"
314+ msgstr ""
315+ "將結構序列 *p* 中索引 *pos* 處的欄位值設為 *o*。與 :c:func:"
316+ "`PyTuple_SET_ITEM` 類似,此函式僅套用於填充全新實例。"
293317
294318#: ../../c-api/tuple.rst:247
295319msgid "This function \" steals\" a reference to *o*."
0 commit comments