@@ -60,7 +60,7 @@ msgstr ""
6060#: ../../c-api/module.rst:46 ../../c-api/module.rst:270
6161#: ../../c-api/module.rst:445
6262msgid "Return ``NULL`` with an exception set on error."
63- msgstr ""
63+ msgstr "当发生错误时将返回 ``NULL`` 并设置一个异常。 "
6464
6565#: ../../c-api/module.rst:50
6666msgid ":attr:`__package__` and :attr:`__loader__` are set to ``None``."
@@ -687,6 +687,8 @@ msgid ""
687687"can be used from the module's initialization function. Return ``-1`` with an"
688688" exception set on error, ``0`` on success."
689689msgstr ""
690+ "将一个整数常量作为 *name* 添加到 *module* 中。 这个便捷函数可在模块的初始化函数中使用。 当发生错误时将返回 ``-1`` "
691+ "并设置一个异常,成功时则返回 ``0``。"
690692
691693#: ../../c-api/module.rst:596
692694msgid ""
@@ -695,6 +697,8 @@ msgid ""
695697"be ``NULL``-terminated. Return ``-1`` with an exception set on error, ``0`` "
696698"on success."
697699msgstr ""
700+ "将一个字符串常量作为 *name* 添加到 *module* 中。 这个便捷函数可在模块初始化函数中使用。 字符串 *value* 必须以 "
701+ "``NULL`` 结尾。 当发生错误时将返回 ``-1``,成功时则返回 ``0``。"
698702
699703#: ../../c-api/module.rst:604
700704msgid ""
@@ -703,6 +707,9 @@ msgid ""
703707"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` "
704708"with an exception set on error, ``0`` on success."
705709msgstr ""
710+ "将一个整数常量添加到 *module* 中。 名称和值取自 *macro*。 例如 ``PyModule_AddIntMacro(module, "
711+ "AF_INET)`` 将值为 *AF_INET* 的整数常量 *AF_INET* 添加到 *module* 中。 当发生错误时将抬 ``-1`` "
712+ "并设置一个异常,成功时将返回 ``0``。"
706713
707714#: ../../c-api/module.rst:612
708715msgid "Add a string constant to *module*."
@@ -715,6 +722,9 @@ msgid ""
715722" the last component of :c:member:`~PyTypeObject.tp_name` after dot. Return "
716723"``-1`` with an exception set on error, ``0`` on success."
717724msgstr ""
725+ "将一个类型对象添加到 *module* 中。 类型对象是通过在内部调用 :c:func:`PyType_Ready` 来最终化的。 类型对象的名称取自 "
726+ ":c:member:`~PyTypeObject.tp_name` 在点号之后的部分。 当发生错误时将返回 ``-1`` 并设置一个异常,成功时将返回 "
727+ "``0``。"
718728
719729#: ../../c-api/module.rst:626
720730msgid "Module lookup"
@@ -776,13 +786,13 @@ msgstr "调用时必须携带GIL。"
776786
777787#: ../../c-api/module.rst:659
778788msgid "Return ``-1`` with an exception set on error, ``0`` on success."
779- msgstr ""
789+ msgstr "出错时返回 ``-1`` 并设置一个异常,成功时返回 ``0``。 "
780790
781791#: ../../c-api/module.rst:665
782792msgid ""
783793"Removes the module object created from *def* from the interpreter state. "
784794"Return ``-1`` with an exception set on error, ``0`` on success."
785- msgstr ""
795+ msgstr "从解释器状态中移除由 *def* 创建的模块对象。 当发生错误时将返回 ``-1`` 并设置一个异常,成功时将返回 ``0``。 "
786796
787797#: ../../c-api/module.rst:8
788798msgid "object"
0 commit comments