44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- 8- # ppcfish <[email protected] >, 20219- 10- # Bryan不可思议, 2023
11- # helloworldSB <[email protected] >, 202312- # Freesand Leo <[email protected] >, 20247+ # Rafael Fontenelle <[email protected] >, 2024138#
149#, fuzzy
1510msgid ""
1611msgstr ""
17- "Project-Id-Version : Python 3.13 \n "
12+ "Project-Id-Version : Python 3.12 \n "
1813"Report-Msgid-Bugs-To : \n "
19- "POT-Creation-Date : 2024-05-10 22:05-0300 \n "
20- "PO-Revision-Date : 2021-06-28 00:50 +0000\n "
21- "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2024\n "
14+ "POT-Creation-Date : 2024-08-30 14:55+0000 \n "
15+ "PO-Revision-Date : 2024-05-11 00:32 +0000\n "
16+ "Last-Translator : Rafael Fontenelle <rffontenelle@gmail .com>, 2024\n "
2217"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2318"MIME-Version : 1.0\n "
2419"Content-Type : text/plain; charset=UTF-8\n "
@@ -55,30 +50,30 @@ msgid ""
5550msgstr "如果 *p* 是一个 tuple 对象但不是 tuple 类型的子类型的实例则返回真值。 此函数总是会成功执行。"
5651
5752#: ../../c-api/tuple.rst:36
58- msgid "Return a new tuple object of size *len*, or ``NULL`` on failure."
59- msgstr "成功时返回一个新的元组对象,长度为 *len*,失败时返回 ``NULL``。"
53+ msgid ""
54+ "Return a new tuple object of size *len*, or ``NULL`` with an exception set "
55+ "on failure."
56+ msgstr ""
6057
61- #: ../../c-api/tuple.rst:41
58+ #: ../../c-api/tuple.rst:42
6259msgid ""
63- "Return a new tuple object of size *n*, or ``NULL`` on failure. The tuple "
64- "values are initialized to the subsequent *n* C arguments pointing to Python "
65- "objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
60+ "Return a new tuple object of size *n*, or ``NULL`` with an exception set on "
61+ "failure. The tuple values are initialized to the subsequent *n* C arguments "
62+ "pointing to Python objects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
6663"``Py_BuildValue(\" (OO)\" , a, b)``."
6764msgstr ""
68- "成功时返回一个新的元组对象,大小为 *n* ,失败时返回 ``NULL``。 元组值初始化为指向 Python 对象的后续 *n* 个 C 参数。 "
69- "``PyTuple_Pack(2, a, b)`` 和 ``Py_BuildValue(\" (OO)\" , a, b)`` 相等。"
70-
71- #: ../../c-api/tuple.rst:48
72- msgid "Take a pointer to a tuple object, and return the size of that tuple."
73- msgstr "获取指向元组对象的指针,并返回该元组的大小。"
7465
75- #: ../../c-api/tuple.rst:53
66+ #: ../../c-api/tuple.rst:50
7667msgid ""
77- "Return the size of the tuple *p*, which must be non-``NULL`` and point to a "
78- "tuple; no error checking is performed."
79- msgstr "返回元组 *p* 的大小,它必须为非 ``NULL`` 并且指向一个元组;不执行错误检查。"
68+ "Take a pointer to a tuple object, and return the size of that tuple. On "
69+ "error, return ``-1`` and with an exception set."
70+ msgstr ""
71+
72+ #: ../../c-api/tuple.rst:56
73+ msgid "Like :c:func:`PyTuple_Size`, but without error checking."
74+ msgstr ""
8075
81- #: ../../c-api/tuple.rst:59
76+ #: ../../c-api/tuple.rst:61
8277msgid ""
8378"Return the object at position *pos* in the tuple pointed to by *p*. If "
8479"*pos* is negative or out of bounds, return ``NULL`` and set an "
@@ -87,7 +82,7 @@ msgstr ""
8782"返回 *p* 所指向的元组中位于 *pos* 处的对象。 如果 *pos* 为负值或超出范围,则返回 ``NULL`` 并设置一个 "
8883":exc:`IndexError` 异常。"
8984
90- #: ../../c-api/tuple.rst:62
85+ #: ../../c-api/tuple.rst:64
9186msgid ""
9287"The returned reference is borrowed from the tuple *p* (that is: it is only "
9388"valid as long as you hold a reference to *p*). To get a :term:`strong "
@@ -98,20 +93,23 @@ msgstr ""
9893"reference`,请使用 :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` 或 "
9994":c:func:`PySequence_GetItem`。"
10095
101- #: ../../c-api/tuple.rst:71
96+ #: ../../c-api/tuple.rst:73
10297msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
10398msgstr "类似于 :c:func:`PyTuple_GetItem`,但不检查其参数。"
10499
105- #: ../../c-api/tuple.rst:76
100+ #: ../../c-api/tuple.rst:78
106101msgid ""
107102"Return the slice of the tuple pointed to by *p* between *low* and *high*, or"
108- " ``NULL`` on failure. This is the equivalent of the Python expression "
109- "``p[low:high]``. Indexing from the end of the tuple is not supported."
103+ " ``NULL`` with an exception set on failure."
110104msgstr ""
111- "返回 *p* 所指向的元组的从 *low* 到 *high* 的切片,或者在失败时返回 ``NULL``。 这等价于 Python 表达式 "
112- "``p[low:high]``。 不支持从元组末尾进行索引。"
113105
114- #: ../../c-api/tuple.rst:83
106+ #: ../../c-api/tuple.rst:81
107+ msgid ""
108+ "This is the equivalent of the Python expression ``p[low:high]``. Indexing "
109+ "from the end of the tuple is not supported."
110+ msgstr ""
111+
112+ #: ../../c-api/tuple.rst:87
115113msgid ""
116114"Insert a reference to object *o* at position *pos* of the tuple pointed to "
117115"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
@@ -120,27 +118,19 @@ msgstr ""
120118"在 *p* 指向的元组的 *pos* 位置插入对对象 *o* 的引用。 成功时返回 ``0``;如果 *pos* 越界,则返回 ``-1``,并抛出一个"
121119" :exc:`IndexError` 异常。"
122120
123- #: ../../c-api/tuple.rst:89
121+ #: ../../c-api/tuple.rst:93
124122msgid ""
125123"This function \" steals\" a reference to *o* and discards a reference to an "
126124"item already in the tuple at the affected position."
127125msgstr "此函数会“窃取”对 *o* 的引用,并丢弃对元组中已在受影响位置的条目的引用。"
128126
129- #: ../../c-api/tuple.rst:95
127+ #: ../../c-api/tuple.rst:99
130128msgid ""
131129"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
132130"*only* be used to fill in brand new tuples."
133131msgstr "类似于 :c:func:`PyTuple_SetItem`,但不进行错误检查,并且应该 *只是* 被用来填充全新的元组。"
134132
135- #: ../../c-api/tuple.rst:98 ../../c-api/tuple.rst:209
136- #: ../../c-api/tuple.rst:227
137- msgid ""
138- "Bounds checking is performed as an assertion if Python is built in "
139- ":ref:`debug mode <debug-build>` or :option:`with assertions <--with-"
140- "assertions>`."
141- msgstr ""
142-
143- #: ../../c-api/tuple.rst:103
133+ #: ../../c-api/tuple.rst:104
144134msgid ""
145135"This function \" steals\" a reference to *o*, and, unlike "
146136":c:func:`PyTuple_SetItem`, does *not* discard a reference to any item that "
@@ -150,7 +140,7 @@ msgstr ""
150140"这个函数会“窃取”一个对 *o* 的引用,但是,不与 :c:func:`PyTuple_SetItem` 不同,它 *不会* "
151141"丢弃对任何被替换项的引用;元组中位于 *pos* 位置的任何引用都将被泄漏。"
152142
153- #: ../../c-api/tuple.rst:111
143+ #: ../../c-api/tuple.rst:112
154144msgid ""
155145"Can be used to resize a tuple. *newsize* will be the new length of the "
156146"tuple. Because tuples are *supposed* to be immutable, this should only be "
@@ -170,11 +160,11 @@ msgstr ""
170160"将被销毁。 失败时,返回 ``-1``,将 ``*p`` 设置为 ``NULL``,并引发 :exc:`MemoryError` 或者 "
171161":exc:`SystemError`。"
172162
173- #: ../../c-api/tuple.rst:126
163+ #: ../../c-api/tuple.rst:127
174164msgid "Struct Sequence Objects"
175165msgstr "结构序列对象"
176166
177- #: ../../c-api/tuple.rst:128
167+ #: ../../c-api/tuple.rst:129
178168msgid ""
179169"Struct sequence objects are the C equivalent of "
180170":func:`~collections.namedtuple` objects, i.e. a sequence whose items can "
@@ -184,7 +174,7 @@ msgstr ""
184174"结构序列对象是等价于 :func:`~collections.namedtuple` 的 C 对象,即一个序列,其中的条目也可以通过属性访问。 "
185175"要创建结构序列,你首先必须创建特定的结构序列类型。"
186176
187- #: ../../c-api/tuple.rst:135
177+ #: ../../c-api/tuple.rst:136
188178msgid ""
189179"Create a new struct sequence type from the data in *desc*, described below. "
190180"Instances of the resulting type can be created with "
@@ -193,37 +183,41 @@ msgstr ""
193183"根据 *desc* 中的数据创建一个新的结构序列类型,如下所述。 可以使用 :c:func:`PyStructSequence_New` "
194184"创建结果类型的实例。"
195185
196- #: ../../c-api/tuple.rst:141
186+ #: ../../c-api/tuple.rst:139 ../../c-api/tuple.rst:207
187+ msgid "Return ``NULL`` with an exception set on failure."
188+ msgstr ""
189+
190+ #: ../../c-api/tuple.rst:144
197191msgid "Initializes a struct sequence type *type* from *desc* in place."
198192msgstr "从 *desc* 就地初始化结构序列类型 *type*。"
199193
200- #: ../../c-api/tuple.rst:146
194+ #: ../../c-api/tuple.rst:149
201195msgid ""
202- "The same as `` PyStructSequence_InitType` `, but returns ``0`` on success and "
203- "``-1`` on failure."
204- msgstr "与 ``PyStructSequence_InitType`` 相同,但成功时返回 ``0`` ,失败时返回 ``-1`` 。 "
196+ "Like :c:func:` PyStructSequence_InitType`, but returns ``0`` on success and "
197+ "``-1`` with an exception set on failure."
198+ msgstr ""
205199
206- #: ../../c-api/tuple.rst:154
200+ #: ../../c-api/tuple.rst:157
207201msgid "Contains the meta information of a struct sequence type to create."
208202msgstr "包含要创建的结构序列类型的元信息。"
209203
210- #: ../../c-api/tuple.rst:158
204+ #: ../../c-api/tuple.rst:161
211205msgid "Name of the struct sequence type."
212206msgstr "结构序列类型的名称。"
213207
214- #: ../../c-api/tuple.rst:162
208+ #: ../../c-api/tuple.rst:165
215209msgid "Pointer to docstring for the type or ``NULL`` to omit."
216210msgstr "指向类型的文档字符串的指针或以 ``NULL`` 表示忽略。"
217211
218- #: ../../c-api/tuple.rst:166
212+ #: ../../c-api/tuple.rst:169
219213msgid "Pointer to ``NULL``-terminated array with field names of the new type."
220214msgstr "指向以 ``NULL`` 结尾的数组的指针,该数组包含新类型的字段名。"
221215
222- #: ../../c-api/tuple.rst:170
216+ #: ../../c-api/tuple.rst:173
223217msgid "Number of fields visible to the Python side (if used as tuple)."
224218msgstr "Python 端可见的字段数(如果用作元组)。"
225219
226- #: ../../c-api/tuple.rst:175
220+ #: ../../c-api/tuple.rst:178
227221msgid ""
228222"Describes a field of a struct sequence. As a struct sequence is modeled as a"
229223" tuple, all fields are typed as :c:expr:`PyObject*`. The index in the "
@@ -235,45 +229,41 @@ msgstr ""
235229":c:type:`PyStructSequence_Desc` 的 :c:member:`~PyStructSequence_Desc.fields` "
236230"数组中的索引决定了描述结构序列的是哪个字段。"
237231
238- #: ../../c-api/tuple.rst:183
232+ #: ../../c-api/tuple.rst:186
239233msgid ""
240234"Name for the field or ``NULL`` to end the list of named fields, set to "
241235":c:data:`PyStructSequence_UnnamedField` to leave unnamed."
242236msgstr ""
243237"字段的名称或 ``NULL`` 表示结束已命名字段列表,设为 :c:data:`PyStructSequence_UnnamedField` "
244238"则保持未命名状态。"
245239
246- #: ../../c-api/tuple.rst:188
240+ #: ../../c-api/tuple.rst:191
247241msgid "Field docstring or ``NULL`` to omit."
248242msgstr "字段文档字符串或 ``NULL`` 表示省略。"
249243
250- #: ../../c-api/tuple.rst:193
244+ #: ../../c-api/tuple.rst:196
251245msgid "Special value for a field name to leave it unnamed."
252246msgstr "字段名的特殊值将保持未命名状态。"
253247
254- #: ../../c-api/tuple.rst:195
248+ #: ../../c-api/tuple.rst:198
255249msgid "The type was changed from ``char *``."
256250msgstr "这个类型已从 ``char *`` 更改。"
257251
258- #: ../../c-api/tuple.rst:201
252+ #: ../../c-api/tuple.rst:204
259253msgid ""
260254"Creates an instance of *type*, which must have been created with "
261255":c:func:`PyStructSequence_NewType`."
262256msgstr "创建 *type* 的实例,该实例必须使用 :c:func:`PyStructSequence_NewType` 创建。"
263257
264- #: ../../c-api/tuple.rst:207
258+ #: ../../c-api/tuple.rst:212
265259msgid ""
266260"Return the object at position *pos* in the struct sequence pointed to by "
267- "*p*."
268- msgstr ""
261+ "*p*. No bounds checking is performed. "
262+ msgstr "返回 *p* 所指向的结构序列中,位于 *pos* 处的对象。不需要进行边界检查。 "
269263
270- #: ../../c-api/tuple.rst:215
271- msgid "Alias to :c:func:`PyStructSequence_GetItem`."
272- msgstr ""
273-
274- #: ../../c-api/tuple.rst:217
275- msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`."
276- msgstr ""
264+ #: ../../c-api/tuple.rst:218
265+ msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`."
266+ msgstr ":c:func:`PyStructSequence_GetItem` 的宏版本。"
277267
278268#: ../../c-api/tuple.rst:223
279269msgid ""
@@ -284,17 +274,15 @@ msgstr ""
284274"将结构序列 *p* 的索引 *pos* 处的字段设置为值 *o*。 与 :c:func:`PyTuple_SET_ITEM` "
285275"一样,它应该只用于填充全新的实例。"
286276
287- #: ../../c-api/tuple.rst:232
277+ #: ../../c-api/tuple.rst:229 ../../c-api/tuple.rst:239
288278msgid "This function \" steals\" a reference to *o*."
289279msgstr "这个函数“窃取”了指向 *o* 的一个引用。"
290280
291- #: ../../c-api/tuple.rst:237
292- msgid "Alias to :c:func:`PyStructSequence_SetItem`."
293- msgstr ""
294-
295- #: ../../c-api/tuple.rst:239
296- msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`."
297- msgstr ""
281+ #: ../../c-api/tuple.rst:234
282+ msgid ""
283+ "Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static "
284+ "inlined function."
285+ msgstr "类似于 :c:func:`PyStructSequence_SetItem`,但是被实现为一个静态内联函数。"
298286
299287#: ../../c-api/tuple.rst:8
300288msgid "object"
0 commit comments