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