@@ -521,13 +521,18 @@ msgid ""
521521":c:type:`PyTupleObject`. The hook function is always called with the GIL "
522522"held by the Python interpreter that raised the event."
523523msgstr ""
524+ "钩子函数的类型为 :c:type:`int (*)(const char *event, PyObject *args, void "
525+ "*userData)`,其中 *args* 保证是一个 :c:type:`PyTupleObject`。 钩子函数调用时总是附带引发该事件的 "
526+ "Python 解释器所持有的 GIL。"
524527
525528#: ../../c-api/sys.rst:360
526529msgid ""
527530"See :pep:`578` for a detailed description of auditing. Functions in the "
528531"runtime and standard library that raise events are listed in the :ref:`audit"
529532" events table <audit-events>`. Details are in each function's documentation."
530533msgstr ""
534+ "请参阅 :pep:`578` 了解有关审计的详细描述。 在运行时和标准库中会引发审计事件的函数清单见 :ref:`审计事件表 <audit-"
535+ "events>`。 更多细节见每个函数的文档。"
531536
532537#: ../../c-api/sys.rst:365
533538msgid ""
@@ -543,6 +548,9 @@ msgid ""
543548"and the exception is cleared. As a result, callers cannot assume that their "
544549"hook has been added unless they control all existing hooks."
545550msgstr ""
551+ "如果解释器已被初始化,此函数将引发审计事件 ``sys.addaudithook`` 且不附带任何参数。 如果有任何现存的钩子引发了一个派生自 "
552+ ":class:`Exception` 的异常,新的钩子将不会被添加且该异常会被清除。 "
553+ "因此,调用方不可假定他们的钩子已被添加除非他们能控制所有现存的钩子。"
546554
547555#: ../../c-api/sys.rst:379
548556msgid "Process Control"
@@ -557,6 +565,9 @@ msgid ""
557565"library function :c:func:`abort` is called which will attempt to produce a "
558566":file:`core` file."
559567msgstr ""
568+ "打印一个致命错误消息并杀掉进程。 不会执行任何清理。 此函数应当仅在检测到可能令继续使用 Python "
569+ "解释器变得危险的条件时被发起调用;例如,当对象管理已被破坏的时候。 在 Unix 上,标准 C 库函数 :c:func:`abort` "
570+ "会被调用并将由它来尝试产生一个 :file:`core` 文件。"
560571
561572#: ../../c-api/sys.rst:393
562573msgid ""
0 commit comments