@@ -132,38 +132,40 @@ msgid ""
132132":exc:`ImportError` and only returns the loader rather than the full "
133133":class:`ModuleSpec`."
134134msgstr ""
135+ "这是针对 :func:`importlib.util.find_spec` 的向下兼容包装器,它将大多数失败转换为 :exc:`ImportError`"
136+ " 并且只返回加载器而不是完整的 :class:`ModuleSpec`。"
135137
136138#: ../../library/pkgutil.rst:87 ../../library/pkgutil.rst:104
137139#: ../../library/pkgutil.rst:119 ../../library/pkgutil.rst:140
138140#: ../../library/pkgutil.rst:161 ../../library/pkgutil.rst:200
139141msgid ""
140142"Updated to be based directly on :mod:`importlib` rather than relying on the "
141143"package internal :pep:`302` import emulation."
142- msgstr ""
144+ msgstr "更新为直接基于 :mod:`importlib` 而不是依赖于包内部的 :pep:`302` 导入模拟。 "
143145
144146#: ../../library/pkgutil.rst:91 ../../library/pkgutil.rst:123
145147msgid "Updated to be based on :pep:`451`"
146- msgstr ""
148+ msgstr "更新为基于 :pep:`451` "
147149
148150#: ../../library/pkgutil.rst:96
149151msgid "Retrieve a :term:`finder` for the given *path_item*."
150- msgstr ""
152+ msgstr "为给定的 *path_item* 获取一个 :term:`finder`。 "
151153
152154#: ../../library/pkgutil.rst:98
153155msgid ""
154156"The returned finder is cached in :data:`sys.path_importer_cache` if it was "
155157"newly created by a path hook."
156- msgstr ""
158+ msgstr "返回的查找器如果是由一个路径钩子新建的则会被缓存至 :data:`sys.path_importer_cache`。 "
157159
158160#: ../../library/pkgutil.rst:101
159161msgid ""
160162"The cache (or part of it) can be cleared manually if a rescan of "
161163":data:`sys.path_hooks` is necessary."
162- msgstr ""
164+ msgstr "如果需要重新扫描 :data:`sys.path_hooks` 则缓存(或其一部分)可以被手动清空。 "
163165
164166#: ../../library/pkgutil.rst:111
165167msgid "Get a :term:`loader` object for *module_or_name*."
166- msgstr ""
168+ msgstr "为 *module_or_name* 获取一个 :term:`loader`。 "
167169
168170#: ../../library/pkgutil.rst:113
169171msgid ""
@@ -173,17 +175,21 @@ msgid ""
173175"not already imported, its containing package (if any) is imported, in order "
174176"to establish the package ``__path__``."
175177msgstr ""
178+ "如果模块或包可通过正常导入机制来访问,则会返回该机制相关部分的包装器。 如果模块无法找到或导入则返回 ``None``。 "
179+ "如果指定的模块尚未被导入,则包含它的包(如果存在)会被导入,以便建立包 ``__path__``。"
176180
177181#: ../../library/pkgutil.rst:129
178182msgid "Yield :term:`finder` objects for the given module name."
179- msgstr ""
183+ msgstr "为给定的模块名称产生 :term:`finder` 对象。 "
180184
181185#: ../../library/pkgutil.rst:131
182186msgid ""
183187"If fullname contains a ``'.'``, the finders will be for the package "
184188"containing fullname, otherwise they will be all registered top level finders"
185189" (i.e. those on both :data:`sys.meta_path` and :data:`sys.path_hooks`)."
186190msgstr ""
191+ "如果完整名称包含一个 ``'.'``,查找器将针对包含该完整名称的包,否则它们将被注册为最高层级查找器(即同时用于 "
192+ ":data:`sys.meta_path` 和 :data:`sys.path_hooks`)。"
187193
188194#: ../../library/pkgutil.rst:135
189195msgid ""
0 commit comments