@@ -12,7 +12,7 @@ msgid ""
12
12
msgstr ""
13
13
"Project-Id-Version : Python 3.13\n "
14
14
"Report-Msgid-Bugs-To : \n "
15
- "POT-Creation-Date : 2025-05-30 14:58 +0000\n "
15
+ "POT-Creation-Date : 2025-06-27 14:55 +0000\n "
16
16
"PO-Revision-Date : 2025-05-08 05:08+0000\n "
17
17
"
Last-Translator :
Freesand Leo <[email protected] >, 2025\n "
18
18
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -119,8 +119,8 @@ msgid ""
119
119
"must be ``Py_None`` or a tuple."
120
120
msgstr "为函数对象 *op* 设置参数默认值。 *defaults* 必须为 ``Py_None`` 或一个元组。"
121
121
122
- #: ../../c-api/function.rst:86 ../../c-api/function.rst:109
123
- #: ../../c-api/function.rst:123
122
+ #: ../../c-api/function.rst:86 ../../c-api/function.rst:116
123
+ #: ../../c-api/function.rst:130
124
124
msgid "Raises :exc:`SystemError` and returns ``-1`` on failure."
125
125
msgstr "失败时引发 :exc:`SystemError` 异常并返回 ``-1`` 。"
126
126
@@ -134,31 +134,46 @@ msgid ""
134
134
"unaltered (default) vectorcall function!"
135
135
msgstr "警告:使用此 API 的扩展必须保留未修改的(默认) vectorcall 函数的行为!"
136
136
137
- #: ../../c-api/function.rst:100
137
+ #: ../../c-api/function.rst:101
138
+ msgid ""
139
+ "Return the keyword-only argument default values of the function object *op*."
140
+ " This can be a dictionary of arguments or ``NULL``."
141
+ msgstr "返回函数对象 *op* 的仅限关键字参数默认值 。这可以是一个参数元组或 ``NULL``。"
142
+
143
+ #: ../../c-api/function.rst:107
138
144
msgid ""
139
145
"Return the closure associated with the function object *op*. This can be "
140
146
"``NULL`` or a tuple of cell objects."
141
147
msgstr "返回关联到函数对象 *op* 的闭包。 这可以是 ``NULL`` 或 cell 对象的元组。"
142
148
143
- #: ../../c-api/function.rst:106
149
+ #: ../../c-api/function.rst:113
144
150
msgid ""
145
151
"Set the closure associated with the function object *op*. *closure* must be "
146
152
"``Py_None`` or a tuple of cell objects."
147
153
msgstr "设置关联到函数对象 *op* 的闭包。 *closure* 必须为 ``Py_None`` 或 cell 对象的元组。"
148
154
149
- #: ../../c-api/function.rst:114
155
+ #: ../../c-api/function.rst:121
150
156
msgid ""
151
157
"Return the annotations of the function object *op*. This can be a mutable "
152
158
"dictionary or ``NULL``."
153
159
msgstr "返回函数对象 *op* 的标注。 这可以是一个可变字典或 ``NULL``。"
154
160
155
- #: ../../c-api/function.rst:120
161
+ #: ../../c-api/function.rst:127
156
162
msgid ""
157
163
"Set the annotations for the function object *op*. *annotations* must be a "
158
164
"dictionary or ``Py_None``."
159
165
msgstr "设置函数对象 *op* 的标注。 *annotations* 必须为一个字典或 ``Py_None``。"
160
166
161
- #: ../../c-api/function.rst:128
167
+ #: ../../c-api/function.rst:141
168
+ msgid ""
169
+ "These functions are similar to their ``PyFunction_Get*`` counterparts, but "
170
+ "do not do type checking. Passing anything other than an instance of "
171
+ ":c:data:`PyFunction_Type` is undefined behavior."
172
+ msgstr ""
173
+ "这些函数与它们的 ``PyFunction_Get*`` 对应物类似,但不会进行类型检查。 传入 :c:data:`PyFunction_Type` "
174
+ "的实例以外的任何东西都是未定义的行为。"
175
+
176
+ #: ../../c-api/function.rst:148
162
177
msgid ""
163
178
"Register *callback* as a function watcher for the current interpreter. "
164
179
"Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In "
@@ -168,7 +183,7 @@ msgstr ""
168
183
"注册 *callback* 作为当前解释器的函数监视器。 返回一个可被传给 :c:func:`PyFunction_ClearWatcher` 的 "
169
184
"ID。 如果出现错误(比如没有足够的可用监视器 ID),则返回 ``-1`` 并设置一个异常。"
170
185
171
- #: ../../c-api/function.rst:138
186
+ #: ../../c-api/function.rst:158
172
187
msgid ""
173
188
"Clear watcher identified by *watcher_id* previously returned from "
174
189
":c:func:`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on"
@@ -179,35 +194,35 @@ msgstr ""
179
194
":c:func:`PyFunction_AddWatcher` 返回的由 *watcher_id* 所标识的监视器。 成功时返回 "
180
195
"``0``,或者出错时(比如当给定的 *watcher_id* 未被注册)返回 ``-1`` 并设置一个异常。"
181
196
182
- #: ../../c-api/function.rst:148
197
+ #: ../../c-api/function.rst:168
183
198
msgid "Enumeration of possible function watcher events:"
184
199
msgstr "由可能的函数监视事件组成的枚举:"
185
200
186
- #: ../../c-api/function.rst:150
201
+ #: ../../c-api/function.rst:170
187
202
msgid "``PyFunction_EVENT_CREATE``"
188
203
msgstr "``PyFunction_EVENT_CREATE``"
189
204
190
- #: ../../c-api/function.rst:151
205
+ #: ../../c-api/function.rst:171
191
206
msgid "``PyFunction_EVENT_DESTROY``"
192
207
msgstr "``PyFunction_EVENT_DESTROY``"
193
208
194
- #: ../../c-api/function.rst:152
209
+ #: ../../c-api/function.rst:172
195
210
msgid "``PyFunction_EVENT_MODIFY_CODE``"
196
211
msgstr "``PyFunction_EVENT_MODIFY_CODE``"
197
212
198
- #: ../../c-api/function.rst:153
213
+ #: ../../c-api/function.rst:173
199
214
msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``"
200
215
msgstr "``PyFunction_EVENT_MODIFY_DEFAULTS``"
201
216
202
- #: ../../c-api/function.rst:154
217
+ #: ../../c-api/function.rst:174
203
218
msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``"
204
219
msgstr "``PyFunction_EVENT_MODIFY_KWDEFAULTS``"
205
220
206
- #: ../../c-api/function.rst:161
221
+ #: ../../c-api/function.rst:181
207
222
msgid "Type of a function watcher callback function."
208
223
msgstr "函数监视器回调函数的类型。"
209
224
210
- #: ../../c-api/function.rst:163
225
+ #: ../../c-api/function.rst:183
211
226
msgid ""
212
227
"If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` "
213
228
"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a "
@@ -218,13 +233,13 @@ msgstr ""
218
233
"*new_value* 将为 ``NULL``。 在其他情况下,*new_value* 将为被修改的属性持有一个指向要保存在 *func* 中的新值的 "
219
234
":term:`borrowed reference`。"
220
235
221
- #: ../../c-api/function.rst:168
236
+ #: ../../c-api/function.rst:188
222
237
msgid ""
223
238
"The callback may inspect but must not modify *func*; doing so could have "
224
239
"unpredictable effects, including infinite recursion."
225
240
msgstr "该回调可以检查但不能修改 *func*; 这样做可能具有不可预知的影响,包括无限递归。"
226
241
227
- #: ../../c-api/function.rst:171
242
+ #: ../../c-api/function.rst:191
228
243
msgid ""
229
244
"If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked "
230
245
"after *func* has been fully initialized. Otherwise, the callback is invoked "
@@ -240,7 +255,7 @@ msgstr ""
240
255
"如有可能函数对象的创建允许被运行时执行优化。 在此情况下将不发出任何事件。 "
241
256
"虽然根据不同的优化决定这会产生可被观察到的运行时行为变化,但是它不会改变所执行的 Python 代码的语义。"
242
257
243
- #: ../../c-api/function.rst:180
258
+ #: ../../c-api/function.rst:200
244
259
msgid ""
245
260
"If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the "
246
261
"callback to the about-to-be-destroyed function will resurrect it, preventing"
@@ -251,7 +266,7 @@ msgstr ""
251
266
"``PyFunction_EVENT_DESTROY``,则在回调中接受一个即将销毁的函数的引用将使其重生,并阻止其在此时被释放。 "
252
267
"当重生的对象以后再被销毁时,任何在当时已激活的监视器回调将再次被调用。"
253
268
254
- #: ../../c-api/function.rst:185
269
+ #: ../../c-api/function.rst:205
255
270
msgid ""
256
271
"If the callback sets an exception, it must return ``-1``; this exception "
257
272
"will be printed as an unraisable exception using "
@@ -260,7 +275,7 @@ msgstr ""
260
275
"如果该回调设置了一个异常,则它必须返回 ``-1``;此异常将作为不可引发的异常使用 :c:func:`PyErr_WriteUnraisable` "
261
276
"打印出来。 在其他情况下它应当返回 ``0``。"
262
277
263
- #: ../../c-api/function.rst:189
278
+ #: ../../c-api/function.rst:209
264
279
msgid ""
265
280
"There may already be a pending exception set on entry to the callback. In "
266
281
"this case, the callback should return ``0`` with the same exception still "
0 commit comments