3
3
#
4
4
# Translators:
5
5
# Leon H., 2017
6
+ # Weilin Du, 2025
6
7
msgid ""
7
8
msgstr ""
8
9
"Project-Id-Version :Python 3.14\n "
9
10
"Report-Msgid-Bugs-To :\n "
10
11
"POT-Creation-Date :2025-02-18 00:13+0000\n "
11
- "PO-Revision-Date :2018-05-23 14:07+0000 \n "
12
- "Last-Translator :Adrian Liaw <adrianliaw2000@gmail .com>\n "
12
+ "PO-Revision-Date :2025-10-08 21:36+0800 \n "
13
+ "Last-Translator :Weilin Du <1372449351@qq .com>\n "
13
14
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
15
"tw)\n "
15
16
"Language :zh_TW\n "
16
17
"MIME-Version :1.0\n "
17
18
"Content-Type :text/plain; charset=UTF-8\n "
18
19
"Content-Transfer-Encoding :8bit\n "
19
20
"Plural-Forms :nplurals=1; plural=0;\n "
21
+ "X-Generator :Poedit 3.6\n "
20
22
21
23
#: ../../c-api/slice.rst:6
22
24
msgid "Slice Objects"
@@ -26,13 +28,14 @@ msgstr "切片物件"
26
28
msgid ""
27
29
"The type object for slice objects. This is the same as :class:`slice` in "
28
30
"the Python layer."
29
- msgstr ""
31
+ msgstr "slice 物件的型別物件。這與 Python 層中的 :class:`slice` 相同。 "
30
32
31
33
#: ../../c-api/slice.rst:17
32
34
msgid ""
33
35
"Return true if *ob* is a slice object; *ob* must not be ``NULL``. This "
34
36
"function always succeeds."
35
37
msgstr ""
38
+ "如果 *ob* 是 slice 物件,則回傳 true;*ob* 不能是 ``NULL`` 。此函式永遠成功。"
36
39
37
40
#: ../../c-api/slice.rst:23
38
41
msgid ""
@@ -41,35 +44,42 @@ msgid ""
41
44
"the same names. Any of the values may be ``NULL``, in which case the "
42
45
"``None`` will be used for the corresponding attribute."
43
46
msgstr ""
47
+ "以指定的值回傳一個新的切片物件。*start*、*stop* 及 *step* 參數會被用為同名的 "
48
+ "slice 物件屬性值。任何值都可能是 ``NULL``,在這種情況下,``None`` 將用於相對"
49
+ "應的屬性。"
44
50
45
51
#: ../../c-api/slice.rst:28
46
52
msgid ""
47
53
"Return ``NULL`` with an exception set if the new object could not be "
48
54
"allocated."
49
- msgstr ""
55
+ msgstr "如果無法分配新物件,則回傳 ``NULL`` 並設定例外。 "
50
56
51
57
#: ../../c-api/slice.rst:34
52
58
msgid ""
53
59
"Retrieve the start, stop and step indices from the slice object *slice*, "
54
60
"assuming a sequence of length *length*. Treats indices greater than *length* "
55
61
"as errors."
56
62
msgstr ""
63
+ "從 slice 物件 *slice* 讀取開始、停止和步進索引,假設序列長度為 *length*。將大"
64
+ "於 *length* 的索引視為錯誤。"
57
65
58
66
#: ../../c-api/slice.rst:38
59
67
msgid ""
60
68
"Returns ``0`` on success and ``-1`` on error with no exception set (unless "
61
69
"one of the indices was not ``None`` and failed to be converted to an "
62
70
"integer, in which case ``-1`` is returned with an exception set)."
63
71
msgstr ""
72
+ "成功時回傳 ``0``,錯誤時回傳 ``-1``,並無例外設定(除非其中一個索引不是 "
73
+ "``None`` 並且未能轉換成整數,在這種情況下會回傳 ``-1`` ,並有設定例外)。"
64
74
65
75
#: ../../c-api/slice.rst:42
66
76
msgid "You probably do not want to use this function."
67
- msgstr ""
77
+ msgstr "你可能不想使用此功能。 "
68
78
69
79
#: ../../c-api/slice.rst:44 ../../c-api/slice.rst:75
70
80
msgid ""
71
81
"The parameter type for the *slice* parameter was ``PySliceObject*`` before."
72
- msgstr ""
82
+ msgstr "之前 *slice* 的參數型別是 ``PySliceObject*`` 。 "
73
83
74
84
#: ../../c-api/slice.rst:51
75
85
msgid ""
@@ -79,6 +89,9 @@ msgid ""
79
89
"bounds indices are clipped in a manner consistent with the handling of "
80
90
"normal slices."
81
91
msgstr ""
92
+ "可用來取代 :c:func:`PySlice_GetIndices`。從假設序列長度為 *length* 的 slice "
93
+ "物件 *slice* 擷取開始、停止和步長索引,並將 slice 的長度存入 *slicelength*。"
94
+ "超出範圍的索引會被剪切,剪切方式與一般切片的處理方式一致。"
82
95
83
96
#: ../../c-api/slice.rst:57
84
97
msgid "Return ``0`` on success and ``-1`` on error with an exception set."
@@ -90,6 +103,9 @@ msgid ""
90
103
"should be replaced by a combination of :c:func:`PySlice_Unpack` "
91
104
"and :c:func:`PySlice_AdjustIndices` where ::"
92
105
msgstr ""
106
+ "這個函式對於可調整大小的序列並不安全。它的呼叫應該"
107
+ "被 :c:func:`PySlice_Unpack` 和 :c:func:`PySlice_AdjustIndices` 的組合取代,其"
108
+ "中: ::"
93
109
94
110
#: ../../c-api/slice.rst:64
95
111
msgid ""
@@ -98,10 +114,14 @@ msgid ""
98
114
" // return error\n"
99
115
"}"
100
116
msgstr ""
117
+ "if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) "
118
+ "< 0) {\n"
119
+ " // return error\n"
120
+ "}"
101
121
102
122
#: ../../c-api/slice.rst:68
103
123
msgid "is replaced by ::"
104
- msgstr ""
124
+ msgstr "被更換為: :: "
105
125
106
126
#: ../../c-api/slice.rst:70
107
127
msgid ""
@@ -110,6 +130,10 @@ msgid ""
110
130
"}\n"
111
131
"slicelength = PySlice_AdjustIndices(length, &start, &stop, step);"
112
132
msgstr ""
133
+ "if (PySlice_Unpack(slice, &start, &stop, &step) < 0) {\n"
134
+ " // return error\n"
135
+ "}\n"
136
+ "slicelength = PySlice_AdjustIndices(length, &start, &stop, step);"
113
137
114
138
#: ../../c-api/slice.rst:79
115
139
msgid ""
@@ -119,13 +143,20 @@ msgid ""
119
143
"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*, "
120
144
"*stop* and *step* are evaluated more than once."
121
145
msgstr ""
146
+ "如果 ``Py_LIMITED_API`` 沒有設定或設定為 ``0x03050400`` 和 ``0x03060000`` (不"
147
+ "包括) 或 ``0x03060100`` 或更高的值 :c:func:`!PySlice_GetIndicesEx` 是使"
148
+ "用 :c:func:`!PySlice_Unpack` 和 :c:func:`!PySlice_AdjustIndices` 來實作一個巨集"
149
+ "。引數 *start*、*stop* 和 *step* 會被計算多次。"
122
150
123
151
#: ../../c-api/slice.rst:86
124
152
msgid ""
125
153
"If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or "
126
154
"between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!"
127
155
"PySlice_GetIndicesEx` is a deprecated function."
128
156
msgstr ""
157
+ "如果 ``Py_LIMITED_API`` 設定為小於 ``0x03050400`` 或介於 ``0x03060000`` 和 "
158
+ "``0x03060100`` 之間 (不包括邊界值) :c:func:`!PySlice_GetIndicesEx` 是一個"
159
+ "已廢棄的函式。"
129
160
130
161
#: ../../c-api/slice.rst:94
131
162
msgid ""
@@ -135,6 +166,10 @@ msgid ""
135
166
"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values "
136
167
"less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``."
137
168
msgstr ""
169
+ "以 C 整數的形式從 slice 物件中抽取 start、stop 及 step 資料成員。將大於 "
170
+ "``PY_SSIZE_T_MAX`` 的值靜默減少為 ``PY_SSIZE_T_MAX``,將小於 ``PY_SSIZE_T_MIN`` "
171
+ "的 start 和 stop 值靜默提升為 ``PY_SSIZE_T_MIN``,將小於 ``-PY_SSIZE_T_MAX`` "
172
+ "的 step 值靜默提升為 ``-PY_SSIZE_T_MAX``。"
138
173
139
174
#: ../../c-api/slice.rst:100
140
175
msgid "Return ``-1`` with an exception set on error, ``0`` on success."
@@ -146,12 +181,14 @@ msgid ""
146
181
"Out of bounds indices are clipped in a manner consistent with the handling "
147
182
"of normal slices."
148
183
msgstr ""
184
+ "假設序列長度為指定長度,調整開始/結束切片索引。超出範圍的索引會以與處理正常切"
185
+ "片一致的方式切除。"
149
186
150
187
#: ../../c-api/slice.rst:111
151
188
msgid ""
152
189
"Return the length of the slice. Always successful. Doesn't call Python "
153
190
"code."
154
- msgstr ""
191
+ msgstr "回傳切片的長度。永遠成功。不呼叫 Python 程式碼。 "
155
192
156
193
#: ../../c-api/slice.rst:118
157
194
msgid "Ellipsis Object"
@@ -162,12 +199,16 @@ msgid ""
162
199
"The type of Python :const:`Ellipsis` object. Same "
163
200
"as :class:`types.EllipsisType` in the Python layer."
164
201
msgstr ""
202
+ "Python :const:`Ellipsis` 物件的型別。與 Python 層中"
203
+ "的 :class:`types.EllipsisType` 相同。"
165
204
166
205
#: ../../c-api/slice.rst:129
167
206
msgid ""
168
207
"The Python ``Ellipsis`` object. This object has no methods. "
169
208
"Like :c:data:`Py_None`, it is an :term:`immortal` singleton object."
170
209
msgstr ""
210
+ "Python ``Ellipsis`` 物件。這個物件沒有方法。就像 :c:data:`Py_None` 一樣,它是"
211
+ "一個 :term:`immortal` 單一物件。"
171
212
172
213
#: ../../c-api/slice.rst:132
173
214
msgid ":c:data:`Py_Ellipsis` is immortal."