@@ -281,14 +281,14 @@ msgstr ""
281281msgid ""
282282"Return the dictionary used for the module administration (a.k.a. "
283283"``sys.modules``). Note that this is a per-interpreter variable."
284- msgstr ""
284+ msgstr "返回用于模块管理的字典 (即 ``sys.modules``)。 请注意这是针对每个解释器的变量。 "
285285
286286#: ../../c-api/import.rst:209
287287msgid ""
288288"Return the already imported module with the given name. If the module has "
289289"not been imported yet then returns ``NULL`` but does not set an error. "
290290"Returns ``NULL`` and sets an error if the lookup failed."
291- msgstr ""
291+ msgstr "返回给定名称的已导入模块。 如果模块尚未导入则返回 ``NULL`` 但不会设置错误。 如果查找失败则返回 ``NULL`` 并设置错误。 "
292292
293293#: ../../c-api/import.rst:217
294294msgid ""
@@ -301,6 +301,11 @@ msgid ""
301301":data:`sys.path_importer_cache`. Return a new reference to the finder "
302302"object."
303303msgstr ""
304+ "返回针对一个 :data:`sys.path`/:attr:`pkg.__path__` 中条目 *path* 的查找器对象,可能会通过 "
305+ ":data:`sys.path_importer_cache` 字典来获取。 如果它尚未被缓存,则会遍历 :data:`sys.path_hooks` "
306+ "直至找到一个能处理该 path 条目的钩子。 如果没有可用的钩子则返回 ``None``;这将告知调用方 :term:`path based "
307+ "finder` 无法为该 path 条目找到查找器。 结果将缓存到 :data:`sys.path_importer_cache`。 "
308+ "返回一个指向查找器对象的新引用。"
304309
305310#: ../../c-api/import.rst:228
306311msgid ""
@@ -310,16 +315,21 @@ msgid ""
310315":c:func:`PyImport_ImportModule`. (Note the misnomer --- this function would"
311316" reload the module if it was already imported.)"
312317msgstr ""
318+ "加载名称为 *name* 的已冻结模块。 成功时返回 ``1``,如果未找到模块则返回 ``0``,如果初始化失败则返回 ``-1`` 并设置一个异常。"
319+ " 要在加载成功后访问被导入的模块,请使用 :c:func:`PyImport_ImportModule`。 (请注意此名称有误导性 --- "
320+ "如果模块已被导入此函数将重载它。)"
313321
314322#: ../../c-api/import.rst:236
315323msgid "The ``__file__`` attribute is no longer set on the module."
316- msgstr ""
324+ msgstr "``__file__`` 属性将不再在模块上设置。 "
317325
318326#: ../../c-api/import.rst:242
319327msgid ""
320328"Similar to :c:func:`PyImport_ImportFrozenModuleObject`, but the name is a "
321329"UTF-8 encoded string instead of a Unicode object."
322330msgstr ""
331+ "类似于 :c:func:`PyImport_ImportFrozenModuleObject`,但其名称为 UTF-8 编码的字符串而不是 "
332+ "Unicode 对象。"
323333
324334#: ../../c-api/import.rst:250
325335msgid ""
@@ -328,6 +338,8 @@ msgid ""
328338" Python source distribution). Its definition, found in "
329339":file:`Include/import.h`, is::"
330340msgstr ""
341+ "这是针对已冻结模块描述器的结构类型定义,与由 :program:`freeze` 工具所生成的一致 (请参看 Python 源代码发行版中的 "
342+ ":file:`Tools/freeze/`)。 其定义可在 :file:`Include/import.h` 中找到::"
331343
332344#: ../../c-api/import.rst:264
333345msgid ""
@@ -349,6 +361,9 @@ msgid ""
349361"function called on the first attempted import. This should be called before"
350362" :c:func:`Py_Initialize`."
351363msgstr ""
364+ "向现有的内置模块表添加一个模块。 这是对 :c:func:`PyImport_ExtendInittab` 的便捷包装,如果无法扩展表则返回 "
365+ "``-1``。 新的模块可使用名称 *name* 来导入,并使用函数 *initfunc* 作为在第一次尝试导入时调用的初始化函数。 此函数应当在 "
366+ ":c:func:`Py_Initialize` 之前调用。"
352367
353368#: ../../c-api/import.rst:282
354369msgid ""
0 commit comments