@@ -191,11 +191,11 @@ msgstr ""
191191msgid ""
192192"If the named module is in a package, that package is imported as a side "
193193"effect of invoking this function."
194- msgstr ""
194+ msgstr "如果指定的模块位于一个包内,则该包会作为发起调用此函数的附带影响被导入。 "
195195
196196#: ../../library/pkgutil.rst:138
197197msgid "If no module name is specified, all top level finders are produced."
198- msgstr ""
198+ msgstr "如果未指定模块名称,则会产生所有的最高层级查找器。 "
199199
200200#: ../../library/pkgutil.rst:147
201201msgid ""
@@ -206,12 +206,12 @@ msgstr ""
206206#: ../../library/pkgutil.rst:150 ../../library/pkgutil.rst:171
207207msgid ""
208208"*path* should be either ``None`` or a list of paths to look for modules in."
209- msgstr ""
209+ msgstr "*path* 应当为 ``None`` 或一个作为查找模块目标的路径的列表。 "
210210
211211#: ../../library/pkgutil.rst:152 ../../library/pkgutil.rst:173
212212msgid ""
213213"*prefix* is a string to output on the front of every module name on output."
214- msgstr ""
214+ msgstr "*prefix* 是要在输出时输出到每个模块名称之前的字符串。 "
215215
216216#: ../../library/pkgutil.rst:156 ../../library/pkgutil.rst:195
217217msgid ""
@@ -220,19 +220,26 @@ msgid ""
220220"for :class:`importlib.machinery.FileFinder` and "
221221":class:`zipimport.zipimporter`."
222222msgstr ""
223+ "只适用于定义了 ``iter_modules()`` 方法的 :term:`finder`。 该接口是非标准的,因此本模块还提供了针对 "
224+ ":class:`importlib.machinery.FileFinder` 和 :class:`zipimport.zipimporter` "
225+ "的实现。"
223226
224227#: ../../library/pkgutil.rst:168
225228msgid ""
226229"Yields :class:`ModuleInfo` for all modules recursively on *path*, or, if "
227230"*path* is ``None``, all accessible modules."
228231msgstr ""
232+ "在 *path* 上递归地为所有模块产生 :class:`ModuleInfo`,或者如果 *path* 为 "
233+ "``None``,则为所有可访问的模块产生。"
229234
230235#: ../../library/pkgutil.rst:175
231236msgid ""
232237"Note that this function must import all *packages* (*not* all modules!) on "
233238"the given *path*, in order to access the ``__path__`` attribute to find "
234239"submodules."
235240msgstr ""
241+ "请注意此函数必须导入给定 *path* 上所有的 *packages* (*而不是* 所有的模块!),以便能访问 ``__path__`` "
242+ "属性来查找子模块。"
236243
237244#: ../../library/pkgutil.rst:179
238245msgid ""
@@ -242,6 +249,8 @@ msgid ""
242249":exc:`ImportError`\\ s are caught and ignored, while all other exceptions are"
243250" propagated, terminating the search."
244251msgstr ""
252+ "*onerror* 是在当试图导入包如果发生任何异常则将附带一个参数(被导入的包的名称)被调用的函数。 如果没有提供 *onerror* 函数,则 "
253+ ":exc:`ImportError` 会被捕获并被忽略,而其他异常则会被传播,导致模块搜索的终结。"
245254
246255#: ../../library/pkgutil.rst:185
247256msgid "Examples::"
@@ -260,6 +269,10 @@ msgid ""
260269"``/`` as the path separator. The parent directory name ``..`` is not "
261270"allowed, and nor is a rooted name (starting with a ``/``)."
262271msgstr ""
272+ "这是一个针对 :term:`loader` :meth:`get_data "
273+ "<importlib.abc.ResourceLoader.get_data>` API 的包装器。 *package* 参数应为一个标准模块格式 "
274+ "(``foo.bar``) 的包名称。 *resource* 参数应为相对路径文件名的形式,使用 ``/`` 作为路径分隔符。 父目录名 "
275+ "``..``,以及根目录名 (以 ``/`` 打头) 均不允许使用。"
263276
264277#: ../../library/pkgutil.rst:216
265278msgid ""
0 commit comments