55#
66# Translators:
77# python-doc bot, 2025
8+ # Rafael Fontenelle <rffontenelle@gmail.com>, 2025
89#
910#, fuzzy
1011msgid ""
1112msgstr ""
1213"Project-Id-Version :Python 3.10\n "
1314"Report-Msgid-Bugs-To :\n "
14- "POT-Creation-Date :2025-01-03 16:02 +0000\n "
15+ "POT-Creation-Date :2025-09-19 16:57 +0000\n "
1516"PO-Revision-Date :2025-09-12 23:37+0000\n "
16- "Last-Translator :python-doc bot , 2025\n "
17+ "Last-Translator :Rafael Fontenelle <rffontenelle@gmail.com> , 2025\n "
1718"Language-Team :Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1819"MIME-Version :1.0\n "
1920"Content-Type :text/plain; charset=UTF-8\n "
@@ -138,6 +139,8 @@ msgid ""
138139":c:func:`PyModule_GetFilename` raises :c:type:`UnicodeEncodeError` on "
139140"unencodable filenames, use :c:func:`PyModule_GetFilenameObject` instead."
140141msgstr ""
142+ ":c:func:`PyModule_GetFilename` 对于不可编码的文件名会引发 "
143+ ":c:type:`UnicodeEncodeError`,请改用 :c:func:`PyModule_GetFilenameObject`。"
141144
142145#: ../../c-api/module.rst:129
143146msgid "Initializing C modules"
@@ -172,7 +175,7 @@ msgstr "模块定义结构,它保存创建模块对象所需的所有信息。
172175
173176#: ../../c-api/module.rst:148
174177msgid "Always initialize this member to :const:`PyModuleDef_HEAD_INIT`."
175- msgstr ""
178+ msgstr "总是将此成员初始化为 :const:`PyModuleDef_HEAD_INIT`。 "
176179
177180#: ../../c-api/module.rst:152
178181msgid "Name for the new module."
@@ -198,7 +201,7 @@ msgid ""
198201"This memory area is allocated based on *m_size* on module creation, and "
199202"freed when the module object is deallocated, after the :c:member:`m_free` "
200203"function has been called, if present."
201- msgstr ""
204+ msgstr "这个内存区域在模块创建时根据 *m_size* 分配,并在调用 :c:member:`m_free` (如果存在)释放模块对象后释放。 "
202205
203206#: ../../c-api/module.rst:169
204207msgid ""
@@ -255,6 +258,9 @@ msgid ""
255258" 0 and the module state (as returned by :c:func:`PyModule_GetState`) is "
256259"``NULL``."
257260msgstr ""
261+ "如果模块状态已被请求但尚未被分配,则不会调用此函数。例如在模块刚刚创建完成之后、被执行之前(:c:data:`Py_mod_exec` "
262+ "函数)时的情况。更准确地说,如果 :c:member:`m_size` 大于0,并且模块状态(由 :c:func:`PyModule_GetState`"
263+ " 返回)为 ``NULL``,则不会调用此函数。"
258264
259265#: ../../c-api/module.rst:209 ../../c-api/module.rst:230
260266#: ../../c-api/module.rst:245
@@ -302,6 +308,8 @@ msgid ""
302308"like :c:func:`PyModule_Create2` with *module_api_version* set to "
303309":const:`PYTHON_API_VERSION`."
304310msgstr ""
311+ "创建一个新的模块对象,在参数 *def* 中给出定义。它等同于将参数 *module_api_version* 设置为 "
312+ ":const:`PYTHON_API_VERSION` 的 :c:func:`PyModule_Create2` 函数。"
305313
306314#: ../../c-api/module.rst:264
307315msgid ""
@@ -338,6 +346,8 @@ msgid ""
338346"The distinction is similar to the :py:meth:`__new__` and :py:meth:`__init__`"
339347" methods of classes."
340348msgstr ""
349+ "另一种指定扩展的方式是“多阶段初始化”。以这种方式创建的扩展模块的行为更类似 Python 模块:初始化分成两个阶段,*创建阶段* "
350+ "创建模块对象,*执行阶段* 填充模块对象。它们的区别类似类的 :py:meth:`__new__` 和 :py:meth:`__init__` 方法。"
341351
342352#: ../../c-api/module.rst:288
343353msgid ""
@@ -352,6 +362,11 @@ msgid ""
352362":attr:`__dict__` or individual classes created with "
353363":c:func:`PyType_FromSpec`)."
354364msgstr ""
365+ "与使用单阶段初始化创建的模块不同,这些模块不是单例:如果 *sys.modules* "
366+ "被移除、模块被重新导入,将会创建一个新的模块对象,旧模块将进入常规的垃圾回收——就像 Python "
367+ "模块那样。默认情况下,根据同一个定义创建的多个模块应该是相互独立的:修改其中之一不应该影响其它模块。这意味着所有状态都应该特定于模块对象(例如使用 "
368+ ":c:func:`PyModule_GetState`),或是它的内容(例如模块的 :attr:`__dict__` 属性,或是使用 "
369+ ":c:func:`PyType_FromSpec` 创建的独立的类)。"
355370
356371#: ../../c-api/module.rst:298
357372msgid ""