Skip to content

Commit eda409f

Browse files
authored
feat: translate c-api/list.po (#617)
1 parent 4a2b11a commit eda409f

File tree

1 file changed

+44
-9
lines changed

1 file changed

+44
-9
lines changed

c-api/list.po

+44-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2022, Python Software Foundation
1+
# Copyright (C) 2001-2023, Python Software Foundation
32
# This file is distributed under the same license as the Python package.
43
#
54
# Translators:
65
# Nkeys Syu <nkeys1324@gmail.com>, 2016
6+
# Matt Wang <mattwang44@gmail.com>, 2023
77
msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
1111
"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"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1515
"tw)\n"
1616
"Language: zh_TW\n"
@@ -26,20 +26,22 @@ msgstr "List(串列)物件"
2626

2727
#: ../../c-api/list.rst:13
2828
msgid "This subtype of :c:type:`PyObject` represents a Python list object."
29-
msgstr ""
29+
msgstr ":c:type:`PyObject` 的這個子型別表示 Python 的 list(串列)物件。"
3030

3131
#: ../../c-api/list.rst:18
3232
msgid ""
3333
"This instance of :c:type:`PyTypeObject` represents the Python list type. "
3434
"This is the same object as :class:`list` in the Python layer."
3535
msgstr ""
36+
"此 :c:type:`PyTypeObject` 實例表示 Python 的 list 型別。這與 Python 層中的 :"
37+
"class:`list` 是同一個物件。"
3638

3739
#: ../../c-api/list.rst:24
3840
msgid ""
3941
"Return true if *p* is a list object or an instance of a subtype of the list "
4042
"type. This function always succeeds."
4143
msgstr ""
42-
"如果 *p* 是一個 list 物件或者是 list 型別的子型別的實例,就回傳 true。這個函"
44+
"如果 *p* 是一個 list 物件或者是 list 型別之子型別的實例,就回傳 true。這個函"
4345
"式永遠會成功執行。"
4446

4547
#: ../../c-api/list.rst:30
@@ -52,7 +54,7 @@ msgstr ""
5254

5355
#: ../../c-api/list.rst:36
5456
msgid "Return a new list of length *len* on success, or ``NULL`` on failure."
55-
msgstr ""
57+
msgstr "成功時回傳長度為 *len* 的新串列,失敗時回傳 ``NULL``。"
5658

5759
#: ../../c-api/list.rst:40
5860
msgid ""
@@ -61,12 +63,16 @@ msgid ""
6163
"`PySequence_SetItem` or expose the object to Python code before setting all "
6264
"items to a real object with :c:func:`PyList_SetItem`."
6365
msgstr ""
66+
"如果 *len* 大於零,則回傳的串列物件之項目將被設定為 ``NULL``。因此,在使用 :"
67+
"c:func:`PyList_SetItem` 來將所有項目設定為一個真實物件前,你無法使用像是 :c:"
68+
"func:`PySequence_SetItem` 的使用抽象 API 函式,也不能將物件暴露 (expose) 給 "
69+
"Python 程式碼。"
6470

6571
#: ../../c-api/list.rst:50
6672
msgid ""
6773
"Return the length of the list object in *list*; this is equivalent to "
6874
"``len(list)`` on a list object."
69-
msgstr ""
75+
msgstr "回傳 *list* 串列物件的長度;這相當於串列物件的 ``len(list)``。"
7076

7177
#: ../../c-api/list.rst:56
7278
msgid "Similar to :c:func:`PyList_Size`, but without error checking."
@@ -79,50 +85,66 @@ msgid ""
7985
"supported. If *index* is out of bounds (<0 or >=len(list)), return ``NULL`` "
8086
"and set an :exc:`IndexError` exception."
8187
msgstr ""
88+
"回傳 *list* 指向的串列中位於 *index* 位置的物件。該位置不可為負數;並不支援從"
89+
"串列尾末開始索引。如果 *index* 超出邊界範圍(<0 或 >=len(list))則回傳 "
90+
"``NULL`` 並設定 :exc:`IndexError` 例外。"
8291

8392
#: ../../c-api/list.rst:69
8493
msgid "Similar to :c:func:`PyList_GetItem`, but without error checking."
85-
msgstr ""
94+
msgstr "與 :c:func:`PyList_GetItem` 類似,但沒有錯誤檢查。"
8695

8796
#: ../../c-api/list.rst:74
8897
msgid ""
8998
"Set the item at index *index* in list to *item*. Return ``0`` on success. "
9099
"If *index* is out of bounds, return ``-1`` and set an :exc:`IndexError` "
91100
"exception."
92101
msgstr ""
102+
"將串列中索引 *index* 處的項目設定為 *item*。成功時回傳 ``0``。如果 *index* 超"
103+
"出邊界範圍則回傳 ``-1`` 並設定一個 :exc:`IndexError` 例外。"
93104

94105
#: ../../c-api/list.rst:80
95106
msgid ""
96107
"This function \"steals\" a reference to *item* and discards a reference to "
97108
"an item already in the list at the affected position."
98109
msgstr ""
110+
"此函式「竊取」對 *item* 的參照,並丟棄對串列中受影響位置上已存在項目的參照。"
99111

100112
#: ../../c-api/list.rst:86
101113
msgid ""
102114
"Macro form of :c:func:`PyList_SetItem` without error checking. This is "
103115
"normally only used to fill in new lists where there is no previous content."
104116
msgstr ""
117+
":c:func:`PyList_SetItem` 的巨集形式,沒有錯誤檢查。這通常僅用於填充沒有已存在"
118+
"內容的新串列。"
105119

106120
#: ../../c-api/list.rst:91
107121
msgid ""
108122
"This macro \"steals\" a reference to *item*, and, unlike :c:func:"
109123
"`PyList_SetItem`, does *not* discard a reference to any item that is being "
110124
"replaced; any reference in *list* at position *i* will be leaked."
111125
msgstr ""
126+
"該巨集「竊取」對 *item* 的參照,並且與 :c:func:`PyList_SetItem` 不同的是,它"
127+
"\\ *不會*\\ 丟棄對任意被替換項目的參照;*list* 中位置 *i* 的任何參照都將被洩"
128+
"漏 (leak)。"
112129

113130
#: ../../c-api/list.rst:99
114131
msgid ""
115132
"Insert the item *item* into list *list* in front of index *index*. Return "
116133
"``0`` if successful; return ``-1`` and set an exception if unsuccessful. "
117134
"Analogous to ``list.insert(index, item)``."
118135
msgstr ""
136+
"將項目 *item* 插入串列 *list* 中索引 *index* 的位置之前。如果成功則回傳 "
137+
"``0``;如果失敗則回傳 ``-1`` 並設定例外。類似於 ``list.insert(index, "
138+
"item)``。"
119139

120140
#: ../../c-api/list.rst:106
121141
msgid ""
122142
"Append the object *item* at the end of list *list*. Return ``0`` if "
123143
"successful; return ``-1`` and set an exception if unsuccessful. Analogous "
124144
"to ``list.append(item)``."
125145
msgstr ""
146+
"將物件 *item* 附加到串列 *list* 的最後面。如果成功則回傳 ``0``;如果不成功,"
147+
"則回傳 ``-1`` 並設定例外。類似於 ``list.append(item)``。"
126148

127149
#: ../../c-api/list.rst:113
128150
msgid ""
@@ -131,6 +153,9 @@ msgid ""
131153
"Analogous to ``list[low:high]``. Indexing from the end of the list is not "
132154
"supported."
133155
msgstr ""
156+
"回傳 *list* 中的物件串列,其中包含 *low* 和 *high* *之間*\\ 的物件。如果沒有"
157+
"成功則回傳 ``NULL`` 並設定例外。類似於 ``list[low:high]``。不支援從串列尾末開"
158+
"始索引。"
134159

135160
#: ../../c-api/list.rst:120
136161
msgid ""
@@ -140,24 +165,34 @@ msgid ""
140165
"Return ``0`` on success, ``-1`` on failure. Indexing from the end of the "
141166
"list is not supported."
142167
msgstr ""
168+
"將 *low* 和 *high* 之間的 *list* 切片設定為 *itemlist* 的內容。類似於 "
169+
"``list[low:high] = itemlist``。*itemlist* 可能為 ``NULL``,表示分配一個空串列"
170+
"(切片刪除)。成功時回傳 ``0``,失敗時則回傳 ``-1``。不支援從串列尾末開始索"
171+
"引。"
143172

144173
#: ../../c-api/list.rst:129
145174
msgid ""
146175
"Sort the items of *list* in place. Return ``0`` on success, ``-1`` on "
147176
"failure. This is equivalent to ``list.sort()``."
148177
msgstr ""
178+
"對 *list* 的項目進行原地 (in place) 排序。成功時回傳 ``0``,失敗時回傳 "
179+
"``-1``。這相當於 ``list.sort()``。"
149180

150181
#: ../../c-api/list.rst:135
151182
msgid ""
152183
"Reverse the items of *list* in place. Return ``0`` on success, ``-1`` on "
153184
"failure. This is the equivalent of ``list.reverse()``."
154185
msgstr ""
186+
"原地反轉 *list* 的項目。成功時回傳 ``0``,失敗時回傳 ``-1``。這相當於 ``list."
187+
"reverse()``。"
155188

156189
#: ../../c-api/list.rst:143
157190
msgid ""
158191
"Return a new tuple object containing the contents of *list*; equivalent to "
159192
"``tuple(list)``."
160193
msgstr ""
194+
"回傳一個新的 tuple(元組)物件,其中包含 *list* 的內容;相當於 "
195+
"``tuple(list)``。"
161196

162197
#: ../../c-api/list.rst:8
163198
msgid "object"

0 commit comments

Comments
 (0)