Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d32110

Browse files
sync with cpython ccc6c2b8
1 parent8718612 commit0d32110

File tree

1 file changed

+57
-46
lines changed

1 file changed

+57
-46
lines changed

‎c-api/tuple.po‎

Lines changed: 57 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version:Python 3.12\n"
1010
"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"
1212
"PO-Revision-Date:2017-09-22 18:26+0000\n"
1313
"Last-Translator:Leon H.\n"
1414
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -46,80 +46,87 @@ msgid ""
4646
msgstr""
4747

4848
#:../../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."
5052
msgstr""
5153

52-
#:../../c-api/tuple.rst:41
54+
#:../../c-api/tuple.rst:42
5355
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 tuplevalues are initialized to the subsequent *n* C arguments "
58+
"pointing to Pythonobjects. ``PyTuple_Pack(2, a, b)`` is equivalent to "
5759
"``Py_BuildValue(\"(OO)\", a, b)``."
5860
msgstr""
5961

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."
6266
msgstr""
6367

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."
6870
msgstr""
6971

70-
#:../../c-api/tuple.rst:59
72+
#:../../c-api/tuple.rst:61
7173
msgid""
7274
"Return the object at position *pos* in the tuple pointed to by *p*. If "
7375
"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:"
7476
"`IndexError` exception."
7577
msgstr""
7678

77-
#:../../c-api/tuple.rst:62
79+
#:../../c-api/tuple.rst:64
7880
msgid""
7981
"The returned reference is borrowed from the tuple *p* (that is: it is only "
8082
"valid as long as you hold a reference to *p*). To get a :term:`strong "
8183
"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` or :c:"
8284
"func:`PySequence_GetItem`."
8385
msgstr""
8486

85-
#:../../c-api/tuple.rst:71
87+
#:../../c-api/tuple.rst:73
8688
msgid"Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments."
8789
msgstr""
8890

89-
#:../../c-api/tuple.rst:76
91+
#:../../c-api/tuple.rst:78
9092
msgid""
9193
"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."
94101
msgstr""
95102

96-
#:../../c-api/tuple.rst:83
103+
#:../../c-api/tuple.rst:87
97104
msgid""
98105
"Insert a reference to object *o* at position *pos* of the tuple pointed to "
99106
"by *p*. Return ``0`` on success. If *pos* is out of bounds, return ``-1`` "
100107
"and set an :exc:`IndexError` exception."
101108
msgstr""
102109

103-
#:../../c-api/tuple.rst:89
110+
#:../../c-api/tuple.rst:93
104111
msgid""
105112
"This function\"steals\" a reference to *o* and discards a reference to an "
106113
"item already in the tuple at the affected position."
107114
msgstr""
108115

109-
#:../../c-api/tuple.rst:95
116+
#:../../c-api/tuple.rst:99
110117
msgid""
111118
"Like :c:func:`PyTuple_SetItem`, but does no error checking, and should "
112119
"*only* be used to fill in brand new tuples."
113120
msgstr""
114121

115-
#:../../c-api/tuple.rst:100
122+
#:../../c-api/tuple.rst:104
116123
msgid""
117124
"This function\"steals\" a reference to *o*, and, unlike :c:func:"
118125
"`PyTuple_SetItem`, does *not* discard a reference to any item that is being "
119126
"replaced; any reference in the tuple at position *pos* will be leaked."
120127
msgstr""
121128

122-
#:../../c-api/tuple.rst:108
129+
#:../../c-api/tuple.rst:112
123130
msgid""
124131
"Can be used to resize a tuple. *newsize* will be the new length of the "
125132
"tuple. Because tuples are *supposed* to be immutable, this should only be "
@@ -134,56 +141,60 @@ msgid ""
134141
"`SystemError`."
135142
msgstr""
136143

137-
#:../../c-api/tuple.rst:123
144+
#:../../c-api/tuple.rst:127
138145
msgid"Struct Sequence Objects"
139146
msgstr""
140147

141-
#:../../c-api/tuple.rst:125
148+
#:../../c-api/tuple.rst:129
142149
msgid""
143150
"Struct sequence objects are the C equivalent of :func:`~collections."
144151
"namedtuple` objects, i.e. a sequence whose items can also be accessed "
145152
"through attributes. To create a struct sequence, you first have to create a "
146153
"specific struct sequence type."
147154
msgstr""
148155

149-
#:../../c-api/tuple.rst:132
156+
#:../../c-api/tuple.rst:136
150157
msgid""
151158
"Create a new struct sequence type from the data in *desc*, described below. "
152159
"Instances of the resulting type can be created with :c:func:"
153160
"`PyStructSequence_New`."
154161
msgstr""
155162

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
157168
msgid"Initializes a struct sequence type *type* from *desc* in place."
158169
msgstr""
159170

160-
#:../../c-api/tuple.rst:143
171+
#:../../c-api/tuple.rst:149
161172
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 seton failure."
164175
msgstr""
165176

166-
#:../../c-api/tuple.rst:151
177+
#:../../c-api/tuple.rst:157
167178
msgid"Contains the meta information of a struct sequence type to create."
168179
msgstr""
169180

170-
#:../../c-api/tuple.rst:155
181+
#:../../c-api/tuple.rst:161
171182
msgid"Name of the struct sequence type."
172183
msgstr""
173184

174-
#:../../c-api/tuple.rst:159
185+
#:../../c-api/tuple.rst:165
175186
msgid"Pointer to docstring for the type or ``NULL`` to omit."
176187
msgstr""
177188

178-
#:../../c-api/tuple.rst:163
189+
#:../../c-api/tuple.rst:169
179190
msgid"Pointer to ``NULL``-terminated array with field names of the new type."
180191
msgstr""
181192

182-
#:../../c-api/tuple.rst:167
193+
#:../../c-api/tuple.rst:173
183194
msgid"Number of fields visible to the Python side (if used as tuple)."
184195
msgstr""
185196

186-
#:../../c-api/tuple.rst:172
197+
#:../../c-api/tuple.rst:178
187198
msgid""
188199
"Describes a field of a struct sequence. As a struct sequence is modeled as a "
189200
"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:"
@@ -192,52 +203,52 @@ msgid ""
192203
"described."
193204
msgstr""
194205

195-
#:../../c-api/tuple.rst:180
206+
#:../../c-api/tuple.rst:186
196207
msgid""
197208
"Name for the field or ``NULL`` to end the list of named fields, set to :c:"
198209
"data:`PyStructSequence_UnnamedField` to leave unnamed."
199210
msgstr""
200211

201-
#:../../c-api/tuple.rst:185
212+
#:../../c-api/tuple.rst:191
202213
msgid"Field docstring or ``NULL`` to omit."
203214
msgstr""
204215

205-
#:../../c-api/tuple.rst:190
216+
#:../../c-api/tuple.rst:196
206217
msgid"Special value for a field name to leave it unnamed."
207218
msgstr""
208219

209-
#:../../c-api/tuple.rst:192
220+
#:../../c-api/tuple.rst:198
210221
msgid"The type was changed from ``char *``."
211222
msgstr""
212223

213-
#:../../c-api/tuple.rst:198
224+
#:../../c-api/tuple.rst:204
214225
msgid""
215226
"Creates an instance of *type*, which must have been created with :c:func:"
216227
"`PyStructSequence_NewType`."
217228
msgstr""
218229

219-
#:../../c-api/tuple.rst:204
230+
#:../../c-api/tuple.rst:212
220231
msgid""
221232
"Return the object at position *pos* in the struct sequence pointed to by "
222233
"*p*. No bounds checking is performed."
223234
msgstr""
224235

225-
#:../../c-api/tuple.rst:210
236+
#:../../c-api/tuple.rst:218
226237
msgid"Macro equivalent of :c:func:`PyStructSequence_GetItem`."
227238
msgstr""
228239

229-
#:../../c-api/tuple.rst:215
240+
#:../../c-api/tuple.rst:223
230241
msgid""
231242
"Sets the field at index *pos* of the struct sequence *p* to value *o*. "
232243
"Like :c:func:`PyTuple_SET_ITEM`, this should only be used to fill in brand "
233244
"new instances."
234245
msgstr""
235246

236-
#:../../c-api/tuple.rst:221../../c-api/tuple.rst:231
247+
#:../../c-api/tuple.rst:229../../c-api/tuple.rst:239
237248
msgid"This function\"steals\" a reference to *o*."
238249
msgstr""
239250

240-
#:../../c-api/tuple.rst:226
251+
#:../../c-api/tuple.rst:234
241252
msgid""
242253
"Similar to :c:func:`PyStructSequence_SetItem`, but implemented as a static "
243254
"inlined function."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp