@@ -12,7 +12,7 @@ msgid ""
1212msgstr ""
1313"Project-Id-Version :Python 3.13\n "
1414"Report-Msgid-Bugs-To :\n "
15- "POT-Creation-Date :2025-11-03 15:10 +0000\n "
15+ "POT-Creation-Date :2025-11-07 15:30 +0000\n "
1616"PO-Revision-Date :2025-09-15 01:03+0000\n "
1717"Last-Translator :Freesand Leo <yuqinju@163.com>, 2025\n "
1818"Language-Team :Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -311,6 +311,10 @@ msgid ""
311311msgstr "返回字典中项目数,等价于对字典 *p* 使用 ``len(p)``。"
312312
313313#: ../../c-api/dict.rst:250
314+ msgid "Similar to :c:func:`PyDict_Size`, but without error checking."
315+ msgstr "类似于 :c:func:`PyDict_Size`,但是不带错误检查。"
316+
317+ #: ../../c-api/dict.rst:255
314318msgid ""
315319"Iterate over all key-value pairs in the dictionary *p*. The "
316320":c:type:`Py_ssize_t` referred to by *ppos* must be initialized to ``0`` "
@@ -328,11 +332,11 @@ msgstr ""
328332":c:expr:`PyObject*` 变量,它们将分别使用每个键和值来填充,或者也可以为 ``NULL``。 通过它们返回的任何引用都是暂借的。 "
329333"*ppos* 在迭代期间不应被更改。 它的值表示内部字典结构中的偏移量,并且由于结构是稀疏的,因此偏移量并不连续。"
330334
331- #: ../../c-api/dict.rst:261
335+ #: ../../c-api/dict.rst:266
332336msgid "For example::"
333337msgstr "例如:"
334338
335- #: ../../c-api/dict.rst:263
339+ #: ../../c-api/dict.rst:268
336340msgid ""
337341"PyObject *key, *value;\n"
338342"Py_ssize_t pos = 0;\n"
@@ -350,14 +354,14 @@ msgstr ""
350354" ...\n"
351355"}"
352356
353- #: ../../c-api/dict.rst:271
357+ #: ../../c-api/dict.rst:276
354358msgid ""
355359"The dictionary *p* should not be mutated during iteration. It is safe to "
356360"modify the values of the keys as you iterate over the dictionary, but only "
357361"so long as the set of keys does not change. For example::"
358362msgstr "字典 *p* 不应该在遍历期间发生改变。在遍历字典时,改变键中的值是安全的,但仅限于键的集合不发生改变。例如::"
359363
360- #: ../../c-api/dict.rst:275
364+ #: ../../c-api/dict.rst:280
361365msgid ""
362366"PyObject *key, *value;\n"
363367"Py_ssize_t pos = 0;\n"
@@ -395,7 +399,7 @@ msgstr ""
395399" Py_DECREF(o);\n"
396400"}"
397401
398- #: ../../c-api/dict.rst:293
402+ #: ../../c-api/dict.rst:298
399403msgid ""
400404"The function is not thread-safe in the :term:`free-threaded <free "
401405"threading>` build without external synchronization. You can use "
@@ -405,7 +409,7 @@ msgstr ""
405409"此函数在没有外部同步的 :term:`自由线程 <free threading>` 编译版中不是线程安全的。 你可以使用 "
406410":c:macro:`Py_BEGIN_CRITICAL_SECTION` 在迭代字典时锁定它::"
407411
408- #: ../../c-api/dict.rst:298
412+ #: ../../c-api/dict.rst:303
409413msgid ""
410414"Py_BEGIN_CRITICAL_SECTION(self->dict);\n"
411415"while (PyDict_Next(self->dict, &pos, &key, &value)) {\n"
@@ -419,7 +423,7 @@ msgstr ""
419423"}\n"
420424"Py_END_CRITICAL_SECTION();"
421425
422- #: ../../c-api/dict.rst:307
426+ #: ../../c-api/dict.rst:312
423427msgid ""
424428"Iterate over mapping object *b* adding key-value pairs to dictionary *a*. "
425429"*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` "
@@ -432,7 +436,7 @@ msgstr ""
432436":c:func:`PyObject_GetItem` 的对象。 如果 *override* 为真值,则如果在 *b* 中找到相同的键则 *a* "
433437"中已存在的相应键值对将被替换,否则如果在 *a* 中没有相同的键则只是添加键值对。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。"
434438
435- #: ../../c-api/dict.rst:317
439+ #: ../../c-api/dict.rst:322
436440msgid ""
437441"This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to "
438442"``a.update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall "
@@ -444,7 +448,7 @@ msgstr ""
444448":c:func:`PyDict_Update` 在第二个参数没有\" keys\" 属性时不会回退到迭代键值对的序列。 当成功时返回 ``0`` "
445449"或者当引发异常时返回 ``-1``。"
446450
447- #: ../../c-api/dict.rst:326
451+ #: ../../c-api/dict.rst:331
448452msgid ""
449453"Update or merge into dictionary *a*, from the key-value pairs in *seq2*. "
450454"*seq2* must be an iterable object producing iterable objects of length 2, "
@@ -457,7 +461,7 @@ msgstr ""
457461"*override* 真值则最后出现的键胜出。 当成功时返回 ``0`` 或者当引发异常时返回 ``-1``。 等价的 Python "
458462"代码(返回值除外)::"
459463
460- #: ../../c-api/dict.rst:333
464+ #: ../../c-api/dict.rst:338
461465msgid ""
462466"def PyDict_MergeFromSeq2(a, seq2, override):\n"
463467" for key, value in seq2:\n"
@@ -469,7 +473,7 @@ msgstr ""
469473" if override or key not in a:\n"
470474" a[key] = value"
471475
472- #: ../../c-api/dict.rst:340
476+ #: ../../c-api/dict.rst:345
473477msgid ""
474478"Register *callback* as a dictionary watcher. Return a non-negative integer "
475479"id which must be passed to future calls to :c:func:`PyDict_Watch`. In case "
@@ -479,7 +483,7 @@ msgstr ""
479483"在字典上注册 *callback* 来作为 watcher。返回值为非负数的整数 id,作为将来调用 :c:func:`PyDict_Watch` "
480484"的时候使用。如果出现错误(比如没有足够的可用 watcher ID),返回 ``-1`` 并且设置异常。"
481485
482- #: ../../c-api/dict.rst:349
486+ #: ../../c-api/dict.rst:354
483487msgid ""
484488"Clear watcher identified by *watcher_id* previously returned from "
485489":c:func:`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. "
@@ -488,7 +492,7 @@ msgstr ""
488492"清空由之前从 :c:func:`PyDict_AddWatcher` 返回的 *watcher_id* 所标识的 watcher。 成功时返回 "
489493"``0``,出错时(例如当给定的 *watcher_id* 未被注册)返回 ``-1``。"
490494
491- #: ../../c-api/dict.rst:357
495+ #: ../../c-api/dict.rst:362
492496msgid ""
493497"Mark dictionary *dict* as watched. The callback granted *watcher_id* by "
494498":c:func:`PyDict_AddWatcher` will be called when *dict* is modified or "
@@ -497,7 +501,7 @@ msgstr ""
497501"将字典 *dict* 标记为已被监视。 由 :c:func:`PyDict_AddWatcher` 授权 *watcher_id* 对应的回调将在 "
498502"*dict* 被修改或释放时被调用。 成功时返回 ``0``,出错时返回 ``-1``。"
499503
500- #: ../../c-api/dict.rst:365
504+ #: ../../c-api/dict.rst:370
501505msgid ""
502506"Mark dictionary *dict* as no longer watched. The callback granted "
503507"*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when "
@@ -507,7 +511,7 @@ msgstr ""
507511"将字典 *dict* 标记为不再被监视。 由 :c:func:`PyDict_AddWatcher` 授权 *watcher_id* 对应的回调在 "
508512"*dict* 被修改或释放时将不再被调用。 该字典在此之前必须已被此监视器所监视。 成功时返回 ``0``,出错时返回 ``-1``。"
509513
510- #: ../../c-api/dict.rst:374
514+ #: ../../c-api/dict.rst:379
511515msgid ""
512516"Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, "
513517"``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, "
@@ -518,11 +522,11 @@ msgstr ""
518522"``PyDict_EVENT_DELETED``, ``PyDict_EVENT_CLONED``, ``PyDict_EVENT_CLEARED`` "
519523"或 ``PyDict_EVENT_DEALLOCATED``。"
520524
521- #: ../../c-api/dict.rst:382
525+ #: ../../c-api/dict.rst:387
522526msgid "Type of a dict watcher callback function."
523527msgstr "字典监视器回调函数的类型。"
524528
525- #: ../../c-api/dict.rst:384
529+ #: ../../c-api/dict.rst:389
526530msgid ""
527531"If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both"
528532" *key* and *new_value* will be ``NULL``. If *event* is "
@@ -535,7 +539,7 @@ msgstr ""
535539"``PyDict_EVENT_MODIFIED``,则 *new_value* 将为 *key* 的新值。 如果 *event* 是 "
536540"``PyDict_EVENT_DELETED``,则将从字典中删除 *key* 而 *new_value* 将为 ``NULL``。"
537541
538- #: ../../c-api/dict.rst:390
542+ #: ../../c-api/dict.rst:395
539543msgid ""
540544"``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another "
541545"dict is merged into it. To maintain efficiency of this operation, per-key "
@@ -545,7 +549,7 @@ msgstr ""
545549"``PyDict_EVENT_CLONED`` 会在另一个字典合并到之前为空的 *dict* 时发生。 为保证此操作的效率,该场景不会发出针对单个键的 "
546550"``PyDict_EVENT_ADDED`` 事件;而是发出单个 ``PyDict_EVENT_CLONED``,而 *key* 将为源字典。"
547551
548- #: ../../c-api/dict.rst:396
552+ #: ../../c-api/dict.rst:401
549553msgid ""
550554"The callback may inspect but must not modify *dict*; doing so could have "
551555"unpredictable effects, including infinite recursion. Do not trigger Python "
@@ -555,7 +559,7 @@ msgstr ""
555559"该回调可以检查但不能修改 *dict*;否则会产生不可预料的影响,包括无限递归。 请不要在该回调中触发 Python 代码的执行,因为它可能产生修改 "
556560"dict 的附带影响。"
557561
558- #: ../../c-api/dict.rst:400
562+ #: ../../c-api/dict.rst:405
559563msgid ""
560564"If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the "
561565"callback to the about-to-be-destroyed dictionary will resurrect it and "
@@ -567,13 +571,13 @@ msgstr ""
567571"``PyDict_EVENT_DEALLOCATED``,则在回调中接受一个对即将销毁的字典的新引用将使其重生并阻止其在此时被释放。 "
568572"当重生的对象以后再被销毁时,任何在当时已激活的监视器回调将再次被调用。"
569573
570- #: ../../c-api/dict.rst:406
574+ #: ../../c-api/dict.rst:411
571575msgid ""
572576"Callbacks occur before the notified modification to *dict* takes place, so "
573577"the prior state of *dict* can be inspected."
574578msgstr "回调会在已通知的对 *dict* 的修改完成之前执行,这样在此之前的 *dict* 状态可以被检查。"
575579
576- #: ../../c-api/dict.rst:409
580+ #: ../../c-api/dict.rst:414
577581msgid ""
578582"If the callback sets an exception, it must return ``-1``; this exception "
579583"will be printed as an unraisable exception using "
@@ -582,7 +586,7 @@ msgstr ""
582586"如果该回调设置了一个异常,则它必须返回 ``-1``;此异常将作为不可引发的异常使用 :c:func:`PyErr_WriteUnraisable` "
583587"打印出来。 在其他情况下它应当返回 ``0``。"
584588
585- #: ../../c-api/dict.rst:413
589+ #: ../../c-api/dict.rst:418
586590msgid ""
587591"There may already be a pending exception set on entry to the callback. In "
588592"this case, the callback should return ``0`` with the same exception still "