8
8
msgstr ""
9
9
"Project-Id-Version : Python 3.12\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
- "POT-Creation-Date : 2023-07-28 00:03+0000\n "
11
+ "POT-Creation-Date : 2024-04-20 00:03+0000\n "
12
12
"PO-Revision-Date : 2017-09-22 18:26+0000\n "
13
13
"Last-Translator : Leon H.\n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -74,44 +74,52 @@ msgid ""
74
74
"`IndexError` exception."
75
75
msgstr ""
76
76
77
- #: ../../c-api/tuple.rst:65
77
+ #: ../../c-api/tuple.rst:62
78
+ msgid ""
79
+ "The returned reference is borrowed from the tuple *p* (that is: it is only "
80
+ "valid as long as you hold a reference to *p*). To get a :term:`strong "
81
+ "reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` or :c:"
82
+ "func:`PySequence_GetItem`."
83
+ msgstr ""
84
+
85
+ #: ../../c-api/tuple.rst:71
78
86
msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
79
87
msgstr ""
80
88
81
- #: ../../c-api/tuple.rst:70
89
+ #: ../../c-api/tuple.rst:76
82
90
msgid ""
83
91
"Return the slice of the tuple pointed to by *p* between *low* and *high*, or "
84
92
"``NULL`` on failure. This is the equivalent of the Python expression "
85
93
"``p[low:high]``. Indexing from the end of the tuple is not supported."
86
94
msgstr ""
87
95
88
- #: ../../c-api/tuple.rst:77
96
+ #: ../../c-api/tuple.rst:83
89
97
msgid ""
90
98
"Insert a reference to object *o* at position *pos* of the tuple pointed to "
91
99
"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
92
100
"and set an :exc:`IndexError` exception."
93
101
msgstr ""
94
102
95
- #: ../../c-api/tuple.rst:83
103
+ #: ../../c-api/tuple.rst:89
96
104
msgid ""
97
105
"This function \" steals\" a reference to *o* and discards a reference to an "
98
106
"item already in the tuple at the affected position."
99
107
msgstr ""
100
108
101
- #: ../../c-api/tuple.rst:89
109
+ #: ../../c-api/tuple.rst:95
102
110
msgid ""
103
111
"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
104
112
"*only* be used to fill in brand new tuples."
105
113
msgstr ""
106
114
107
- #: ../../c-api/tuple.rst:94
115
+ #: ../../c-api/tuple.rst:100
108
116
msgid ""
109
117
"This function \" steals\" a reference to *o*, and, unlike :c:func:"
110
118
"`PyTuple_SetItem`, does *not* discard a reference to any item that is being "
111
119
"replaced; any reference in the tuple at position *pos* will be leaked."
112
120
msgstr ""
113
121
114
- #: ../../c-api/tuple.rst:102
122
+ #: ../../c-api/tuple.rst:108
115
123
msgid ""
116
124
"Can be used to resize a tuple. *newsize* will be the new length of the "
117
125
"tuple. Because tuples are *supposed* to be immutable, this should only be "
@@ -126,56 +134,56 @@ msgid ""
126
134
"`SystemError`."
127
135
msgstr ""
128
136
129
- #: ../../c-api/tuple.rst:117
137
+ #: ../../c-api/tuple.rst:123
130
138
msgid "Struct Sequence Objects"
131
139
msgstr ""
132
140
133
- #: ../../c-api/tuple.rst:119
141
+ #: ../../c-api/tuple.rst:125
134
142
msgid ""
135
143
"Struct sequence objects are the C equivalent of :func:`~collections."
136
144
"namedtuple` objects, i.e. a sequence whose items can also be accessed "
137
145
"through attributes. To create a struct sequence, you first have to create a "
138
146
"specific struct sequence type."
139
147
msgstr ""
140
148
141
- #: ../../c-api/tuple.rst:126
149
+ #: ../../c-api/tuple.rst:132
142
150
msgid ""
143
151
"Create a new struct sequence type from the data in *desc*, described below. "
144
152
"Instances of the resulting type can be created with :c:func:"
145
153
"`PyStructSequence_New`."
146
154
msgstr ""
147
155
148
- #: ../../c-api/tuple.rst:132
156
+ #: ../../c-api/tuple.rst:138
149
157
msgid "Initializes a struct sequence type *type* from *desc* in place."
150
158
msgstr ""
151
159
152
- #: ../../c-api/tuple.rst:137
160
+ #: ../../c-api/tuple.rst:143
153
161
msgid ""
154
162
"The same as ``PyStructSequence_InitType``, but returns ``0`` on success and "
155
163
"``-1`` on failure."
156
164
msgstr ""
157
165
158
- #: ../../c-api/tuple.rst:145
166
+ #: ../../c-api/tuple.rst:151
159
167
msgid "Contains the meta information of a struct sequence type to create."
160
168
msgstr ""
161
169
162
- #: ../../c-api/tuple.rst:149
170
+ #: ../../c-api/tuple.rst:155
163
171
msgid "Name of the struct sequence type."
164
172
msgstr ""
165
173
166
- #: ../../c-api/tuple.rst:153
174
+ #: ../../c-api/tuple.rst:159
167
175
msgid "Pointer to docstring for the type or ``NULL`` to omit."
168
176
msgstr ""
169
177
170
- #: ../../c-api/tuple.rst:157
178
+ #: ../../c-api/tuple.rst:163
171
179
msgid "Pointer to ``NULL``-terminated array with field names of the new type."
172
180
msgstr ""
173
181
174
- #: ../../c-api/tuple.rst:161
182
+ #: ../../c-api/tuple.rst:167
175
183
msgid "Number of fields visible to the Python side (if used as tuple)."
176
184
msgstr ""
177
185
178
- #: ../../c-api/tuple.rst:166
186
+ #: ../../c-api/tuple.rst:172
179
187
msgid ""
180
188
"Describes a field of a struct sequence. As a struct sequence is modeled as a "
181
189
"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:"
@@ -184,52 +192,52 @@ msgid ""
184
192
"described."
185
193
msgstr ""
186
194
187
- #: ../../c-api/tuple.rst:174
195
+ #: ../../c-api/tuple.rst:180
188
196
msgid ""
189
197
"Name for the field or ``NULL`` to end the list of named fields, set to :c:"
190
198
"data:`PyStructSequence_UnnamedField` to leave unnamed."
191
199
msgstr ""
192
200
193
- #: ../../c-api/tuple.rst:179
201
+ #: ../../c-api/tuple.rst:185
194
202
msgid "Field docstring or ``NULL`` to omit."
195
203
msgstr ""
196
204
197
- #: ../../c-api/tuple.rst:184
205
+ #: ../../c-api/tuple.rst:190
198
206
msgid "Special value for a field name to leave it unnamed."
199
207
msgstr ""
200
208
201
- #: ../../c-api/tuple.rst:186
209
+ #: ../../c-api/tuple.rst:192
202
210
msgid "The type was changed from ``char *``."
203
211
msgstr ""
204
212
205
- #: ../../c-api/tuple.rst:192
213
+ #: ../../c-api/tuple.rst:198
206
214
msgid ""
207
215
"Creates an instance of *type*, which must have been created with :c:func:"
208
216
"`PyStructSequence_NewType`."
209
217
msgstr ""
210
218
211
- #: ../../c-api/tuple.rst:198
219
+ #: ../../c-api/tuple.rst:204
212
220
msgid ""
213
221
"Return the object at position *pos* in the struct sequence pointed to by "
214
222
"*p*. No bounds checking is performed."
215
223
msgstr ""
216
224
217
- #: ../../c-api/tuple.rst:204
225
+ #: ../../c-api/tuple.rst:210
218
226
msgid "Macro equivalent of :c:func:`PyStructSequence_GetItem`."
219
227
msgstr ""
220
228
221
- #: ../../c-api/tuple.rst:209
229
+ #: ../../c-api/tuple.rst:215
222
230
msgid ""
223
231
"Sets the field at index *pos* of the struct sequence *p* to value *o*. "
224
232
"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand "
225
233
"new instances."
226
234
msgstr ""
227
235
228
- #: ../../c-api/tuple.rst:215 ../../c-api/tuple.rst:225
236
+ #: ../../c-api/tuple.rst:221 ../../c-api/tuple.rst:231
229
237
msgid "This function \" steals\" a reference to *o*."
230
238
msgstr ""
231
239
232
- #: ../../c-api/tuple.rst:220
240
+ #: ../../c-api/tuple.rst:226
233
241
msgid ""
234
242
"Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static "
235
243
"inlined function."
0 commit comments