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:
6
5
# Nkeys Syu <nkeys1324@gmail.com>, 2016
6
+ # Matt Wang <mattwang44@gmail.com>, 2023
7
7
msgid ""
8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.12\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
11
"POT-Creation-Date : 2023-05-09 00:15+0000\n "
12
- "PO-Revision-Date : 2023-03-03 20:35 +0800\n "
13
- "Last-Translator : Nkeys Syu <nkeys1324 @gmail.com>\n "
12
+ "PO-Revision-Date : 2023-08-24 00:55 +0800\n "
13
+ "Last-Translator : Matt Wang <mattwang44 @gmail.com>\n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
15
15
"tw)\n "
16
16
"Language : zh_TW\n "
@@ -26,20 +26,22 @@ msgstr "List(串列)物件"
26
26
27
27
#: ../../c-api/list.rst:13
28
28
msgid "This subtype of :c:type:`PyObject` represents a Python list object."
29
- msgstr ""
29
+ msgstr ":c:type:`PyObject` 的這個子型別表示 Python 的 list(串列)物件。 "
30
30
31
31
#: ../../c-api/list.rst:18
32
32
msgid ""
33
33
"This instance of :c:type:`PyTypeObject` represents the Python list type. "
34
34
"This is the same object as :class:`list` in the Python layer."
35
35
msgstr ""
36
+ "此 :c:type:`PyTypeObject` 實例表示 Python 的 list 型別。這與 Python 層中的 :"
37
+ "class:`list` 是同一個物件。"
36
38
37
39
#: ../../c-api/list.rst:24
38
40
msgid ""
39
41
"Return true if *p* is a list object or an instance of a subtype of the list "
40
42
"type. This function always succeeds."
41
43
msgstr ""
42
- "如果 *p* 是一個 list 物件或者是 list 型別的子型別的實例 ,就回傳 true。這個函"
44
+ "如果 *p* 是一個 list 物件或者是 list 型別之子型別的實例 ,就回傳 true。這個函"
43
45
"式永遠會成功執行。"
44
46
45
47
#: ../../c-api/list.rst:30
@@ -52,7 +54,7 @@ msgstr ""
52
54
53
55
#: ../../c-api/list.rst:36
54
56
msgid "Return a new list of length *len* on success, or ``NULL`` on failure."
55
- msgstr ""
57
+ msgstr "成功時回傳長度為 *len* 的新串列,失敗時回傳 ``NULL``。 "
56
58
57
59
#: ../../c-api/list.rst:40
58
60
msgid ""
@@ -61,12 +63,16 @@ msgid ""
61
63
"`PySequence_SetItem` or expose the object to Python code before setting all "
62
64
"items to a real object with :c:func:`PyList_SetItem`."
63
65
msgstr ""
66
+ "如果 *len* 大於零,則回傳的串列物件之項目將被設定為 ``NULL``。因此,在使用 :"
67
+ "c:func:`PyList_SetItem` 來將所有項目設定為一個真實物件前,你無法使用像是 :c:"
68
+ "func:`PySequence_SetItem` 的使用抽象 API 函式,也不能將物件暴露 (expose) 給 "
69
+ "Python 程式碼。"
64
70
65
71
#: ../../c-api/list.rst:50
66
72
msgid ""
67
73
"Return the length of the list object in *list*; this is equivalent to "
68
74
"``len(list)`` on a list object."
69
- msgstr ""
75
+ msgstr "回傳 *list* 串列物件的長度;這相當於串列物件的 ``len(list)``。 "
70
76
71
77
#: ../../c-api/list.rst:56
72
78
msgid "Similar to :c:func:`PyList_Size`, but without error checking."
@@ -79,50 +85,66 @@ msgid ""
79
85
"supported. If *index* is out of bounds (<0 or >=len(list)), return ``NULL`` "
80
86
"and set an :exc:`IndexError` exception."
81
87
msgstr ""
88
+ "回傳 *list* 指向的串列中位於 *index* 位置的物件。該位置不可為負數;並不支援從"
89
+ "串列尾末開始索引。如果 *index* 超出邊界範圍(<0 或 >=len(list))則回傳 "
90
+ "``NULL`` 並設定 :exc:`IndexError` 例外。"
82
91
83
92
#: ../../c-api/list.rst:69
84
93
msgid "Similar to :c:func:`PyList_GetItem`, but without error checking."
85
- msgstr ""
94
+ msgstr "與 :c:func:`PyList_GetItem` 類似,但沒有錯誤檢查。 "
86
95
87
96
#: ../../c-api/list.rst:74
88
97
msgid ""
89
98
"Set the item at index *index* in list to *item*. Return ``0`` on success. "
90
99
"If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` "
91
100
"exception."
92
101
msgstr ""
102
+ "將串列中索引 *index* 處的項目設定為 *item*。成功時回傳 ``0``。如果 *index* 超"
103
+ "出邊界範圍則回傳 ``-1`` 並設定一個 :exc:`IndexError` 例外。"
93
104
94
105
#: ../../c-api/list.rst:80
95
106
msgid ""
96
107
"This function \" steals\" a reference to *item* and discards a reference to "
97
108
"an item already in the list at the affected position."
98
109
msgstr ""
110
+ "此函式「竊取」對 *item* 的參照,並丟棄對串列中受影響位置上已存在項目的參照。"
99
111
100
112
#: ../../c-api/list.rst:86
101
113
msgid ""
102
114
"Macro form of :c:func:`PyList_SetItem` without error checking. This is "
103
115
"normally only used to fill in new lists where there is no previous content."
104
116
msgstr ""
117
+ ":c:func:`PyList_SetItem` 的巨集形式,沒有錯誤檢查。這通常僅用於填充沒有已存在"
118
+ "內容的新串列。"
105
119
106
120
#: ../../c-api/list.rst:91
107
121
msgid ""
108
122
"This macro \" steals\" a reference to *item*, and, unlike :c:func:"
109
123
"`PyList_SetItem`, does *not* discard a reference to any item that is being "
110
124
"replaced; any reference in *list* at position *i* will be leaked."
111
125
msgstr ""
126
+ "該巨集「竊取」對 *item* 的參照,並且與 :c:func:`PyList_SetItem` 不同的是,它"
127
+ "\\ *不會*\\ 丟棄對任意被替換項目的參照;*list* 中位置 *i* 的任何參照都將被洩"
128
+ "漏 (leak)。"
112
129
113
130
#: ../../c-api/list.rst:99
114
131
msgid ""
115
132
"Insert the item *item* into list *list* in front of index *index*. Return "
116
133
"``0`` if successful; return ``-1`` and set an exception if unsuccessful. "
117
134
"Analogous to ``list.insert(index, item)``."
118
135
msgstr ""
136
+ "將項目 *item* 插入串列 *list* 中索引 *index* 的位置之前。如果成功則回傳 "
137
+ "``0``;如果失敗則回傳 ``-1`` 並設定例外。類似於 ``list.insert(index, "
138
+ "item)``。"
119
139
120
140
#: ../../c-api/list.rst:106
121
141
msgid ""
122
142
"Append the object *item* at the end of list *list*. Return ``0`` if "
123
143
"successful; return ``-1`` and set an exception if unsuccessful. Analogous "
124
144
"to ``list.append(item)``."
125
145
msgstr ""
146
+ "將物件 *item* 附加到串列 *list* 的最後面。如果成功則回傳 ``0``;如果不成功,"
147
+ "則回傳 ``-1`` 並設定例外。類似於 ``list.append(item)``。"
126
148
127
149
#: ../../c-api/list.rst:113
128
150
msgid ""
@@ -131,6 +153,9 @@ msgid ""
131
153
"Analogous to ``list[low:high]``. Indexing from the end of the list is not "
132
154
"supported."
133
155
msgstr ""
156
+ "回傳 *list* 中的物件串列,其中包含 *low* 和 *high* *之間*\\ 的物件。如果沒有"
157
+ "成功則回傳 ``NULL`` 並設定例外。類似於 ``list[low:high]``。不支援從串列尾末開"
158
+ "始索引。"
134
159
135
160
#: ../../c-api/list.rst:120
136
161
msgid ""
@@ -140,24 +165,34 @@ msgid ""
140
165
"Return ``0`` on success, ``-1`` on failure. Indexing from the end of the "
141
166
"list is not supported."
142
167
msgstr ""
168
+ "將 *low* 和 *high* 之間的 *list* 切片設定為 *itemlist* 的內容。類似於 "
169
+ "``list[low:high] = itemlist``。*itemlist* 可能為 ``NULL``,表示分配一個空串列"
170
+ "(切片刪除)。成功時回傳 ``0``,失敗時則回傳 ``-1``。不支援從串列尾末開始索"
171
+ "引。"
143
172
144
173
#: ../../c-api/list.rst:129
145
174
msgid ""
146
175
"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on "
147
176
"failure. This is equivalent to ``list.sort()``."
148
177
msgstr ""
178
+ "對 *list* 的項目進行原地 (in place) 排序。成功時回傳 ``0``,失敗時回傳 "
179
+ "``-1``。這相當於 ``list.sort()``。"
149
180
150
181
#: ../../c-api/list.rst:135
151
182
msgid ""
152
183
"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on "
153
184
"failure. This is the equivalent of ``list.reverse()``."
154
185
msgstr ""
186
+ "原地反轉 *list* 的項目。成功時回傳 ``0``,失敗時回傳 ``-1``。這相當於 ``list."
187
+ "reverse()``。"
155
188
156
189
#: ../../c-api/list.rst:143
157
190
msgid ""
158
191
"Return a new tuple object containing the contents of *list*; equivalent to "
159
192
"``tuple(list)``."
160
193
msgstr ""
194
+ "回傳一個新的 tuple(元組)物件,其中包含 *list* 的內容;相當於 "
195
+ "``tuple(list)``。"
161
196
162
197
#: ../../c-api/list.rst:8
163
198
msgid "object"
0 commit comments