@@ -464,9 +464,9 @@ msgid ""
464464":attr:`__path__` from the parent package. If a loader cannot be found, "
465465"``None`` is returned."
466466msgstr ""
467- "一个用于查找指定的模块中 :term:`加载器` 的遗留方法。如果这是最高层级的导入,*path* 的值将会是 "
468- "``None``。 否则,这是一个查找子包或者模块的方法并且 *path* 的值将会是来自父包的 "
469- ":attr:``__path__``的值。如果未发现加载器,返回 ``None``。"
467+ "一个用于查找指定的模块中 :term:`loader` 的遗留方法。如果这是最高层级的导入,*path* 的值将会是 ``None``。 "
468+ "否则,这是一个查找子包或者模块的方法并且 *path* 的值将会是来自父包的 :attr:``__path__`` 的值。如果未发现加载器,返回 "
469+ "``None``。"
470470
471471#: ../../library/importlib.rst:288
472472msgid ""
@@ -479,7 +479,7 @@ msgid ""
479479"Returns ``None`` when called instead of raising :exc:`NotImplementedError`. "
480480"Can use :meth:`find_spec` to provide functionality."
481481msgstr ""
482- "当调用这个方法的时候返回 `None` 而不是引起 ` :exc:`NotImplementedError` 异常。 可以使用 "
482+ "当调用这个方法的时候返回 `` None`` 而不是引发 :exc:`NotImplementedError`。 可以使用 "
483483":meth:`find_spec` 来提供功能。"
484484
485485#: ../../library/importlib.rst:296 ../../library/importlib.rst:349
@@ -508,8 +508,8 @@ msgid ""
508508":class:`PathFinder`. This ABC is a subclass of :class:`Finder` for "
509509"compatibility reasons only."
510510msgstr ""
511- ":term:`路径入口查找器` 的一个抽象基类。尽管这个基类和 :class:`MetaPathFinder` 有一些相似之处,但是 "
512- "``PathEntryFinder`` 只在由 :class:`PathFinder` 提供的基于路径导入子系统中使用。这个抽象类是 "
511+ ":term:`path entry finder` 的一个抽象基类。尽管这个基类和 :class:`MetaPathFinder` 有一些相似之处,但是"
512+ " ``PathEntryFinder`` 只在由 :class:`PathFinder` 提供的基于路径导入子系统中使用。这个抽象类是 "
513513":term:`Finder` 的一个子类,仅仅是因为兼容性的原因。"
514514
515515#: ../../library/importlib.rst:321
@@ -520,9 +520,9 @@ msgid ""
520520"``None`` is returned. When passed in, ``target`` is a module object that "
521521"the finder may use to make a more educated guess about what spec to return."
522522msgstr ""
523- "一个为了在指定的模块中查找模块 :term:`spec <module spec>` 而定义的抽象方法。查找器只会在赋值给 :term:`路径入口` "
524- "里面查找那个模块。如果未能找到一个规范, 返回 ``None`` 。 当向这个函数传参时,``target`` "
525- "是这个查找器用于做出对于返回什么规范更具有根据的猜测的一个模块对象 。"
523+ "一个为了在指定的模块中查找模块 :term:`规格 <module spec>` 而定义的抽象方法。 查找器只会在赋值给 :term:`path "
524+ "entry` 里面查找那个模块。如果未能找到一个规格, 返回 ``None``。 当向这个函数传参时,``target`` "
525+ "是这个查找器用于做出对于返回什么规格更具有根据的猜测的一个模块对象 。"
526526
527527#: ../../library/importlib.rst:332
528528msgid ""
@@ -536,8 +536,11 @@ msgid ""
536536"list then no loader or location for a namespace package were found (i.e. "
537537"failure to find anything for the module)."
538538msgstr ""
539- "一个用于在模块中查找一个:term:`加载器`的遗留方法。返回一个``(loader, "
540- "portion)``的2元元组,``portion``是一个贡献给命名空间包部分的文件系统位置的序列。加载器可能是``None``,同时正在指定的``portion``表示的是贡献给命名空间包的文件系统位置。``portion``可以使用一个空列表来表示加载器不是命名空间包的一部分。如果``loader``是``None``并且``portion``是一个空列表,那么命名空间包中无加载器或者文件系统位置可查找到(即在那个模块中未能找到任何东西)。"
539+ "一个用于在模块中查找一个 :term:`loader` 的遗留方法。 返回一个 ``(loader, portion)`` "
540+ "的2元组,``portion`` 是一个贡献给命名空间包部分的文件系统位置的序列。 加载器可能是 ``None``,同时正在指定的 "
541+ "``portion`` 表示的是贡献给命名空间包的文件系统位置。``portion`` 可以使用一个空列表来表示加载器不是命名空间包的一部分。 如果 "
542+ "``loader`` 是 ``None`` 并且 ``portion`` "
543+ "是一个空列表,那么命名空间包中无加载器或者文件系统位置可查找到(即在那个模块中未能找到任何东西)。"
541544
542545#: ../../library/importlib.rst:342
543546msgid ""
@@ -550,8 +553,8 @@ msgid ""
550553"Returns ``(None, [])`` instead of raising :exc:`NotImplementedError`. Uses "
551554":meth:`find_spec` when available to provide functionality."
552555msgstr ""
553- "返回 ``(None, [])`` ,而不是引起 : exc:`NotImplementedError` 异常。 当可于提供相应的功能的时候,使用 "
554- ": meth:`find_spec` 。"
556+ "返回 ``(None, [])`` 而不是引发 : exc:`NotImplementedError`。 当可于提供相应的功能的时候,使用 "
557+ ": meth:`find_spec`。"
555558
556559#: ../../library/importlib.rst:354
557560msgid ""
@@ -573,7 +576,7 @@ msgstr ""
573576msgid ""
574577"An abstract base class for a :term:`loader`. See :pep:`302` for the exact "
575578"definition for a loader."
576- msgstr ":term:`加载器` 的抽象基类。关于一个加载器的实际定义,查看 :pep:`302`。"
579+ msgstr ":term:`loader` 的抽象基类。 关于一个加载器的实际定义请查看 :pep:`302`。"
577580
578581#: ../../library/importlib.rst:372 ../../library/importlib.rst:832
579582msgid ""
@@ -599,7 +602,7 @@ msgstr "当导入一个模块的时候,一个返回将要使用的那个模块
599602msgid ""
600603"Starting in Python 3.6, this method will not be optional when "
601604":meth:`exec_module` is defined."
602- msgstr "从Python 3.6开始 ,当定义了:meth:`exec_module` 的时候,这个方法将不会是可选的。"
605+ msgstr "从 Python 3.6 开始 ,当定义了 :meth:`exec_module` 的时候,这个方法将不会是可选的。"
603606
604607#: ../../library/importlib.rst:393
605608msgid ""
@@ -668,7 +671,7 @@ msgstr ""
668671msgid ""
669672"The path to where a compiled version of the module is/should be stored (not "
670673"set when the attribute would be inappropriate)."
671- msgstr ""
674+ msgstr "被存储或应该被存储的模块的编译版本的路径(当这个属性不恰当的时候不设置)。 "
672675
673676#: ../../library/importlib.rst:435
674677msgid ":attr:`__path__`"
@@ -678,7 +681,7 @@ msgstr ""
678681msgid ""
679682"A list of strings specifying the search path within a package. This "
680683"attribute is not set on modules."
681- msgstr ""
684+ msgstr "指定在一个包中搜索路径的一个字符串列表。这个属性不在模块上面进行设置。 "
682685
683686#: ../../library/importlib.rst:441
684687msgid ":attr:`__package__`"
@@ -691,6 +694,8 @@ msgid ""
691694":func:`importlib.util.module_for_loader` decorator can handle the details "
692695"for :attr:`__package__`."
693696msgstr ""
697+ "模块/包的父包。如果这个模块是最上层的,那么它是一个为空字符串的值。 "
698+ ":func:`importlib.util.module_for_loader`装饰器可以处理 :attr:`__package__`的细节。"
694699
695700#: ../../library/importlib.rst:446
696701msgid ":attr:`__loader__`"
@@ -702,18 +707,22 @@ msgid ""
702707":func:`importlib.util.module_for_loader` decorator can handle the details "
703708"for :attr:`__package__`."
704709msgstr ""
710+ "用来加载那个模块的加载器。 :func:`importlib.util.module_for_loader` 装饰器可以处理 "
711+ ":attr:`__package__`的细节。"
705712
706713#: ../../library/importlib.rst:448
707714msgid ""
708715"When :meth:`exec_module` is available then backwards-compatible "
709716"functionality is provided."
710- msgstr ""
717+ msgstr "当 :meth:`exec_module` 可用的时候,那么则提供了向后兼容的功能。 "
711718
712719#: ../../library/importlib.rst:451
713720msgid ""
714721"Raise :exc:`ImportError` when called instead of :exc:`NotImplementedError`. "
715722"Functionality provided when :meth:`exec_module` is available."
716723msgstr ""
724+ "当这个方法被调用的时候,引起 :exc:`ImportError` 异常而不是 :exc:`NotImplementedError` 。当 "
725+ ":meth:`exec_module` 可用的时候,由 :meth:`exec_module` 提供功能。"
717726
718727#: ../../library/importlib.rst:456
719728msgid ""
@@ -722,6 +731,8 @@ msgid ""
722731"load_module(). The import machinery takes care of all the other "
723732"responsibilities of load_module() when exec_module() is implemented."
724733msgstr ""
734+ "加载模块推荐的使用的 API 是 :meth:`exec_module`(和 "
735+ ":meth:`create_module`)。加载器应该实现它而不是`load_module()`。当`exec_module()`被实现的时候,导入机制关心的是`load_module()`所有其他的责任。"
725736
726737#: ../../library/importlib.rst:465
727738msgid ""
0 commit comments