11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2023 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
991010# Bryan不可思议, 2023
1111# helloworldSB <[email protected] >, 202312- # Freesand Leo <[email protected] >, 2023 12+ # Freesand Leo <[email protected] >, 2024 1313#
1414#, fuzzy
1515msgid ""
1616msgstr ""
1717"Project-Id-Version : Python 3.12\n "
1818"Report-Msgid-Bugs-To : \n "
19- "POT-Creation-Date : 2023-07-29 02:08 +0000\n "
19+ "POT-Creation-Date : 2024-04-19 14:13 +0000\n "
2020"PO-Revision-Date : 2021-06-28 00:50+0000\n "
21- "
Last-Translator :
Freesand Leo <[email protected] >, 2023 \n "
21+ "
Last-Translator :
Freesand Leo <[email protected] >, 2024 \n "
2222"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2323"MIME-Version : 1.0\n "
2424"Content-Type : text/plain; charset=UTF-8\n "
@@ -87,11 +87,22 @@ msgstr ""
8787"返回 *p* 所指向的元组中位于 *pos* 处的对象。 如果 *pos* 为负值或超出范围,则返回 ``NULL`` 并设置一个 "
8888":exc:`IndexError` 异常。"
8989
90- #: ../../c-api/tuple.rst:65
90+ #: ../../c-api/tuple.rst:62
91+ msgid ""
92+ "The returned reference is borrowed from the tuple *p* (that is: it is only "
93+ "valid as long as you hold a reference to *p*). To get a :term:`strong "
94+ "reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` or "
95+ ":c:func:`PySequence_GetItem`."
96+ msgstr ""
97+ "返回的引用是从元组 *p* 借入的(也就是说:它只在你持有对 *p* 的引用时才是可用的)。 要获取 :term:`strong "
98+ "reference`,请使用 :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` 或 "
99+ ":c:func:`PySequence_GetItem`。"
100+
101+ #: ../../c-api/tuple.rst:71
91102msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
92103msgstr "类似于 :c:func:`PyTuple_GetItem`,但不检查其参数。"
93104
94- #: ../../c-api/tuple.rst:70
105+ #: ../../c-api/tuple.rst:76
95106msgid ""
96107"Return the slice of the tuple pointed to by *p* between *low* and *high*, or"
97108" ``NULL`` on failure. This is the equivalent of the Python expression "
@@ -100,7 +111,7 @@ msgstr ""
100111"返回 *p* 所指向的元组的从 *low* 到 *high* 的切片,或者在失败时返回 ``NULL``。 这等价于 Python 表达式 "
101112"``p[low:high]``。 不支持从元组末尾进行索引。"
102113
103- #: ../../c-api/tuple.rst:77
114+ #: ../../c-api/tuple.rst:83
104115msgid ""
105116"Insert a reference to object *o* at position *pos* of the tuple pointed to "
106117"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
@@ -109,19 +120,19 @@ msgstr ""
109120"在 *p* 指向的元组的 *pos* 位置插入对对象 *o* 的引用。 成功时返回 ``0``;如果 *pos* 越界,则返回 ``-1``,并抛出一个"
110121" :exc:`IndexError` 异常。"
111122
112- #: ../../c-api/tuple.rst:83
123+ #: ../../c-api/tuple.rst:89
113124msgid ""
114125"This function \" steals\" a reference to *o* and discards a reference to an "
115126"item already in the tuple at the affected position."
116127msgstr "此函数会“窃取”对 *o* 的引用,并丢弃对元组中已在受影响位置的条目的引用。"
117128
118- #: ../../c-api/tuple.rst:89
129+ #: ../../c-api/tuple.rst:95
119130msgid ""
120131"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
121132"*only* be used to fill in brand new tuples."
122133msgstr "类似于 :c:func:`PyTuple_SetItem`,但不进行错误检查,并且应该 *只是* 被用来填充全新的元组。"
123134
124- #: ../../c-api/tuple.rst:94
135+ #: ../../c-api/tuple.rst:100
125136msgid ""
126137"This function \" steals\" a reference to *o*, and, unlike "
127138":c:func:`PyTuple_SetItem`, does *not* discard a reference to any item that "
@@ -131,7 +142,7 @@ msgstr ""
131142"这个函数会“窃取”一个对 *o* 的引用,但是,不与 :c:func:`PyTuple_SetItem` 不同,它 *不会* "
132143"丢弃对任何被替换项的引用;元组中位于 *pos* 位置的任何引用都将被泄漏。"
133144
134- #: ../../c-api/tuple.rst:102
145+ #: ../../c-api/tuple.rst:108
135146msgid ""
136147"Can be used to resize a tuple. *newsize* will be the new length of the "
137148"tuple. Because tuples are *supposed* to be immutable, this should only be "
@@ -151,11 +162,11 @@ msgstr ""
151162"将被销毁。 失败时,返回 ``-1``,将 ``*p`` 设置为 ``NULL``,并引发 :exc:`MemoryError` 或者 "
152163":exc:`SystemError`。"
153164
154- #: ../../c-api/tuple.rst:117
165+ #: ../../c-api/tuple.rst:123
155166msgid "Struct Sequence Objects"
156167msgstr "结构序列对象"
157168
158- #: ../../c-api/tuple.rst:119
169+ #: ../../c-api/tuple.rst:125
159170msgid ""
160171"Struct sequence objects are the C equivalent of "
161172":func:`~collections.namedtuple` objects, i.e. a sequence whose items can "
@@ -165,7 +176,7 @@ msgstr ""
165176"结构序列对象是等价于 :func:`~collections.namedtuple` 的 C 对象,即一个序列,其中的条目也可以通过属性访问。 "
166177"要创建结构序列,你首先必须创建特定的结构序列类型。"
167178
168- #: ../../c-api/tuple.rst:126
179+ #: ../../c-api/tuple.rst:132
169180msgid ""
170181"Create a new struct sequence type from the data in *desc*, described below. "
171182"Instances of the resulting type can be created with "
@@ -174,37 +185,37 @@ msgstr ""
174185"根据 *desc* 中的数据创建一个新的结构序列类型,如下所述。 可以使用 :c:func:`PyStructSequence_New` "
175186"创建结果类型的实例。"
176187
177- #: ../../c-api/tuple.rst:132
188+ #: ../../c-api/tuple.rst:138
178189msgid "Initializes a struct sequence type *type* from *desc* in place."
179190msgstr "从 *desc* 就地初始化结构序列类型 *type*。"
180191
181- #: ../../c-api/tuple.rst:137
192+ #: ../../c-api/tuple.rst:143
182193msgid ""
183194"The same as ``PyStructSequence_InitType``, but returns ``0`` on success and "
184195"``-1`` on failure."
185196msgstr "与 ``PyStructSequence_InitType`` 相同,但成功时返回 ``0`` ,失败时返回 ``-1`` 。"
186197
187- #: ../../c-api/tuple.rst:145
198+ #: ../../c-api/tuple.rst:151
188199msgid "Contains the meta information of a struct sequence type to create."
189200msgstr "包含要创建的结构序列类型的元信息。"
190201
191- #: ../../c-api/tuple.rst:149
202+ #: ../../c-api/tuple.rst:155
192203msgid "Name of the struct sequence type."
193204msgstr "结构序列类型的名称。"
194205
195- #: ../../c-api/tuple.rst:153
206+ #: ../../c-api/tuple.rst:159
196207msgid "Pointer to docstring for the type or ``NULL`` to omit."
197208msgstr "指向类型的文档字符串的指针或以 ``NULL`` 表示忽略。"
198209
199- #: ../../c-api/tuple.rst:157
210+ #: ../../c-api/tuple.rst:163
200211msgid "Pointer to ``NULL``-terminated array with field names of the new type."
201212msgstr "指向以 ``NULL`` 结尾的数组的指针,该数组包含新类型的字段名。"
202213
203- #: ../../c-api/tuple.rst:161
214+ #: ../../c-api/tuple.rst:167
204215msgid "Number of fields visible to the Python side (if used as tuple)."
205216msgstr "Python 端可见的字段数(如果用作元组)。"
206217
207- #: ../../c-api/tuple.rst:166
218+ #: ../../c-api/tuple.rst:172
208219msgid ""
209220"Describes a field of a struct sequence. As a struct sequence is modeled as a"
210221" tuple, all fields are typed as :c:expr:`PyObject*`. The index in the "
@@ -216,43 +227,43 @@ msgstr ""
216227":c:type:`PyStructSequence_Desc` 的 :c:member:`~PyStructSequence_Desc.fields` "
217228"数组中的索引决定了描述结构序列的是哪个字段。"
218229
219- #: ../../c-api/tuple.rst:174
230+ #: ../../c-api/tuple.rst:180
220231msgid ""
221232"Name for the field or ``NULL`` to end the list of named fields, set to "
222233":c:data:`PyStructSequence_UnnamedField` to leave unnamed."
223234msgstr ""
224235"字段的名称或 ``NULL`` 表示结束已命名字段列表,设为 :c:data:`PyStructSequence_UnnamedField` "
225236"则保持未命名状态。"
226237
227- #: ../../c-api/tuple.rst:179
238+ #: ../../c-api/tuple.rst:185
228239msgid "Field docstring or ``NULL`` to omit."
229240msgstr "字段文档字符串或 ``NULL`` 表示省略。"
230241
231- #: ../../c-api/tuple.rst:184
242+ #: ../../c-api/tuple.rst:190
232243msgid "Special value for a field name to leave it unnamed."
233244msgstr "字段名的特殊值将保持未命名状态。"
234245
235- #: ../../c-api/tuple.rst:186
246+ #: ../../c-api/tuple.rst:192
236247msgid "The type was changed from ``char *``."
237248msgstr "这个类型已从 ``char *`` 更改。"
238249
239- #: ../../c-api/tuple.rst:192
250+ #: ../../c-api/tuple.rst:198
240251msgid ""
241252"Creates an instance of *type*, which must have been created with "
242253":c:func:`PyStructSequence_NewType`."
243254msgstr "创建 *type* 的实例,该实例必须使用 :c:func:`PyStructSequence_NewType` 创建。"
244255
245- #: ../../c-api/tuple.rst:198
256+ #: ../../c-api/tuple.rst:204
246257msgid ""
247258"Return the object at position *pos* in the struct sequence pointed to by "
248259"*p*. No bounds checking is performed."
249260msgstr "返回 *p* 所指向的结构序列中,位于 *pos* 处的对象。不需要进行边界检查。"
250261
251- #: ../../c-api/tuple.rst:204
262+ #: ../../c-api/tuple.rst:210
252263msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`."
253264msgstr ":c:func:`PyStructSequence_GetItem` 的宏版本。"
254265
255- #: ../../c-api/tuple.rst:209
266+ #: ../../c-api/tuple.rst:215
256267msgid ""
257268"Sets the field at index *pos* of the struct sequence *p* to value *o*. Like"
258269" :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand new "
@@ -261,11 +272,11 @@ msgstr ""
261272"将结构序列 *p* 的索引 *pos* 处的字段设置为值 *o*。 与 :c:func:`PyTuple_SET_ITEM` "
262273"一样,它应该只用于填充全新的实例。"
263274
264- #: ../../c-api/tuple.rst:215 ../../c-api/tuple.rst:225
275+ #: ../../c-api/tuple.rst:221 ../../c-api/tuple.rst:231
265276msgid "This function \" steals\" a reference to *o*."
266277msgstr "这个函数“窃取”了指向 *o* 的一个引用。"
267278
268- #: ../../c-api/tuple.rst:220
279+ #: ../../c-api/tuple.rst:226
269280msgid ""
270281"Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static "
271282"inlined function."
0 commit comments