Skip to content

Commit 4a21d69

Browse files
pydoc-zh-tw[bot]github-actions[bot]
authored andcommitted
Sync with CPython 3.14 (#1159)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ad13909 commit 4a21d69

File tree

3 files changed

+232
-226
lines changed

3 files changed

+232
-226
lines changed

c-api/capsule.po

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.14\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2025-10-25 22:20+0000\n"
9+
"POT-Creation-Date: 2025-11-07 15:15+0000\n"
1010
"PO-Revision-Date: 2018-05-23 14:30+0000\n"
1111
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -37,141 +37,147 @@ msgid ""
3737
msgstr ""
3838

3939
#: ../../c-api/capsule.rst:27
40+
msgid ""
41+
"The type object corresponding to capsule objects. This is the same object "
42+
"as :class:`types.CapsuleType` in the Python layer."
43+
msgstr ""
44+
45+
#: ../../c-api/capsule.rst:33
4046
msgid "The type of a destructor callback for a capsule. Defined as::"
4147
msgstr ""
4248

43-
#: ../../c-api/capsule.rst:29
49+
#: ../../c-api/capsule.rst:35
4450
msgid "typedef void (*PyCapsule_Destructor)(PyObject *);"
4551
msgstr "typedef void (*PyCapsule_Destructor)(PyObject *);"
4652

47-
#: ../../c-api/capsule.rst:31
53+
#: ../../c-api/capsule.rst:37
4854
msgid ""
4955
"See :c:func:`PyCapsule_New` for the semantics of PyCapsule_Destructor "
5056
"callbacks."
5157
msgstr ""
5258

53-
#: ../../c-api/capsule.rst:37
59+
#: ../../c-api/capsule.rst:43
5460
msgid ""
5561
"Return true if its argument is a :c:type:`PyCapsule`. This function always "
5662
"succeeds."
5763
msgstr ""
5864

59-
#: ../../c-api/capsule.rst:43
65+
#: ../../c-api/capsule.rst:49
6066
msgid ""
6167
"Create a :c:type:`PyCapsule` encapsulating the *pointer*. The *pointer* "
6268
"argument may not be ``NULL``."
6369
msgstr ""
6470

65-
#: ../../c-api/capsule.rst:46
71+
#: ../../c-api/capsule.rst:52
6672
msgid "On failure, set an exception and return ``NULL``."
6773
msgstr ""
6874

69-
#: ../../c-api/capsule.rst:48
75+
#: ../../c-api/capsule.rst:54
7076
msgid ""
7177
"The *name* string may either be ``NULL`` or a pointer to a valid C string. "
7278
"If non-``NULL``, this string must outlive the capsule. (Though it is "
7379
"permitted to free it inside the *destructor*.)"
7480
msgstr ""
7581

76-
#: ../../c-api/capsule.rst:52
82+
#: ../../c-api/capsule.rst:58
7783
msgid ""
7884
"If the *destructor* argument is not ``NULL``, it will be called with the "
7985
"capsule as its argument when it is destroyed."
8086
msgstr ""
8187

82-
#: ../../c-api/capsule.rst:55
88+
#: ../../c-api/capsule.rst:61
8389
msgid ""
8490
"If this capsule will be stored as an attribute of a module, the *name* "
8591
"should be specified as ``modulename.attributename``. This will enable other "
8692
"modules to import the capsule using :c:func:`PyCapsule_Import`."
8793
msgstr ""
8894

89-
#: ../../c-api/capsule.rst:62
95+
#: ../../c-api/capsule.rst:68
9096
msgid ""
9197
"Retrieve the *pointer* stored in the capsule. On failure, set an exception "
9298
"and return ``NULL``."
9399
msgstr ""
94100

95-
#: ../../c-api/capsule.rst:65
101+
#: ../../c-api/capsule.rst:71
96102
msgid ""
97103
"The *name* parameter must compare exactly to the name stored in the capsule. "
98104
"If the name stored in the capsule is ``NULL``, the *name* passed in must "
99105
"also be ``NULL``. Python uses the C function :c:func:`!strcmp` to compare "
100106
"capsule names."
101107
msgstr ""
102108

103-
#: ../../c-api/capsule.rst:73
109+
#: ../../c-api/capsule.rst:79
104110
msgid ""
105111
"Return the current destructor stored in the capsule. On failure, set an "
106112
"exception and return ``NULL``."
107113
msgstr ""
108114

109-
#: ../../c-api/capsule.rst:76
115+
#: ../../c-api/capsule.rst:82
110116
msgid ""
111117
"It is legal for a capsule to have a ``NULL`` destructor. This makes a "
112118
"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :"
113119
"c:func:`PyErr_Occurred` to disambiguate."
114120
msgstr ""
115121

116-
#: ../../c-api/capsule.rst:83
122+
#: ../../c-api/capsule.rst:89
117123
msgid ""
118124
"Return the current context stored in the capsule. On failure, set an "
119125
"exception and return ``NULL``."
120126
msgstr ""
121127

122-
#: ../../c-api/capsule.rst:86
128+
#: ../../c-api/capsule.rst:92
123129
msgid ""
124130
"It is legal for a capsule to have a ``NULL`` context. This makes a ``NULL`` "
125131
"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:"
126132
"`PyErr_Occurred` to disambiguate."
127133
msgstr ""
128134

129-
#: ../../c-api/capsule.rst:93
135+
#: ../../c-api/capsule.rst:99
130136
msgid ""
131137
"Return the current name stored in the capsule. On failure, set an exception "
132138
"and return ``NULL``."
133139
msgstr ""
134140

135-
#: ../../c-api/capsule.rst:96
141+
#: ../../c-api/capsule.rst:102
136142
msgid ""
137143
"It is legal for a capsule to have a ``NULL`` name. This makes a ``NULL`` "
138144
"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:"
139145
"`PyErr_Occurred` to disambiguate."
140146
msgstr ""
141147

142-
#: ../../c-api/capsule.rst:103
148+
#: ../../c-api/capsule.rst:109
143149
msgid ""
144150
"Import a pointer to a C object from a capsule attribute in a module. The "
145151
"*name* parameter should specify the full name to the attribute, as in "
146152
"``module.attribute``. The *name* stored in the capsule must match this "
147153
"string exactly."
148154
msgstr ""
149155

150-
#: ../../c-api/capsule.rst:108
156+
#: ../../c-api/capsule.rst:114
151157
msgid ""
152158
"This function splits *name* on the ``.`` character, and imports the first "
153159
"element. It then processes further elements using attribute lookups."
154160
msgstr ""
155161

156-
#: ../../c-api/capsule.rst:111
162+
#: ../../c-api/capsule.rst:117
157163
msgid ""
158164
"Return the capsule's internal *pointer* on success. On failure, set an "
159165
"exception and return ``NULL``."
160166
msgstr ""
161167

162-
#: ../../c-api/capsule.rst:116
168+
#: ../../c-api/capsule.rst:122
163169
msgid ""
164170
"If *name* points to an attribute of some submodule or subpackage, this "
165171
"submodule or subpackage must be previously imported using other means (for "
166172
"example, by using :c:func:`PyImport_ImportModule`) for the attribute lookups "
167173
"to succeed."
168174
msgstr ""
169175

170-
#: ../../c-api/capsule.rst:121
176+
#: ../../c-api/capsule.rst:127
171177
msgid "*no_block* has no effect anymore."
172178
msgstr ""
173179

174-
#: ../../c-api/capsule.rst:127
180+
#: ../../c-api/capsule.rst:133
175181
msgid ""
176182
"Determines whether or not *capsule* is a valid capsule. A valid capsule is "
177183
"non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` "
@@ -180,41 +186,41 @@ msgid ""
180186
"compared.)"
181187
msgstr ""
182188

183-
#: ../../c-api/capsule.rst:133
189+
#: ../../c-api/capsule.rst:139
184190
msgid ""
185191
"In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls "
186192
"to any of the accessors (any function starting with ``PyCapsule_Get``) are "
187193
"guaranteed to succeed."
188194
msgstr ""
189195

190-
#: ../../c-api/capsule.rst:137
196+
#: ../../c-api/capsule.rst:143
191197
msgid ""
192198
"Return a nonzero value if the object is valid and matches the name passed "
193199
"in. Return ``0`` otherwise. This function will not fail."
194200
msgstr ""
195201

196-
#: ../../c-api/capsule.rst:143
202+
#: ../../c-api/capsule.rst:149
197203
msgid "Set the context pointer inside *capsule* to *context*."
198204
msgstr ""
199205

200-
#: ../../c-api/capsule.rst:145 ../../c-api/capsule.rst:152
201-
#: ../../c-api/capsule.rst:161 ../../c-api/capsule.rst:169
206+
#: ../../c-api/capsule.rst:151 ../../c-api/capsule.rst:158
207+
#: ../../c-api/capsule.rst:167 ../../c-api/capsule.rst:175
202208
msgid ""
203209
"Return ``0`` on success. Return nonzero and set an exception on failure."
204210
msgstr ""
205211

206-
#: ../../c-api/capsule.rst:150
212+
#: ../../c-api/capsule.rst:156
207213
msgid "Set the destructor inside *capsule* to *destructor*."
208214
msgstr ""
209215

210-
#: ../../c-api/capsule.rst:157
216+
#: ../../c-api/capsule.rst:163
211217
msgid ""
212218
"Set the name inside *capsule* to *name*. If non-``NULL``, the name must "
213219
"outlive the capsule. If the previous *name* stored in the capsule was not "
214220
"``NULL``, no attempt is made to free it."
215221
msgstr ""
216222

217-
#: ../../c-api/capsule.rst:166
223+
#: ../../c-api/capsule.rst:172
218224
msgid ""
219225
"Set the void pointer inside *capsule* to *pointer*. The pointer may not be "
220226
"``NULL``."

0 commit comments

Comments
 (0)