Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 630970a

Browse files
committed
[po] auto sync bot
1 parent 1926416 commit 630970a

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

reference/import.po

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ msgid ""
231231
"that package if the path of their parent package (or :data:`sys.path` for a "
232232
"top level package) changes."
233233
msgstr ""
234+
"命名空间包的 ``__path__`` 属性不使用普通的列表。 而是使用定制的可迭代类型,如果其父包的路径 (或者最高层级包的 "
235+
":data:`sys.path`) 发生改变,这种对象会在该包内的下一次导入尝试时自动执行新的对包部分的搜索。"
234236

235237
#: ../../reference/import.rst:147
236238
msgid ""
@@ -241,14 +243,17 @@ msgid ""
241243
" create a namespace package for the top-level ``parent`` package whenever it"
242244
" or one of its subpackages is imported."
243245
msgstr ""
246+
"命名空间包没有 ``parent/__init__.py`` 文件。 实际上,在导入搜索期间可能找到多个 ``parent`` "
247+
"目录,每个都由不同的部分所提供。 因此 ``parent/one`` 的物理位置不一定与 ``parent/two`` 相邻。 "
248+
"在这种情况下,Python 将为顶级的 ``parent`` 包创建一个命名空间包,无论是它本身还是它的某个子包被导入。"
244249

245250
#: ../../reference/import.rst:154
246251
msgid "See also :pep:`420` for the namespace package specification."
247-
msgstr ""
252+
msgstr "另请参阅 :pep:`420` 了解对命名空间包的规格描述。"
248253

249254
#: ../../reference/import.rst:158
250255
msgid "Searching"
251-
msgstr ""
256+
msgstr "搜索"
252257

253258
#: ../../reference/import.rst:160
254259
msgid ""
@@ -259,6 +264,9 @@ msgid ""
259264
"parameters to the :func:`importlib.import_module` or :func:`__import__` "
260265
"functions."
261266
msgstr ""
267+
"为了开始搜索,Python 需要被导入模块(或者包,对于当前讨论来说两者没有差别)的完整 :term:`限定名称 <qualified name>`。 "
268+
"此名称可以来自 :keyword:`import` 语句所带的各种参数,或者来自传给 :func:`importlib.import_module` 或"
269+
" :func:`__import__` 函数的形参。"
262270

263271
#: ../../reference/import.rst:166
264272
msgid ""
@@ -268,10 +276,13 @@ msgid ""
268276
"``foo.bar.baz``. If any of the intermediate imports fail, a "
269277
":exc:`ModuleNotFoundError` is raised."
270278
msgstr ""
279+
"此名称会在导入搜索的各个阶段被使用,它也可以是指向一个子模块的带点号路径,例如 ``foo.bar.baz``。 在这种情况下,Python "
280+
"会先尝试导入 ``foo``,然后是 ``foo.bar``,最后是 ``foo.bar.baz``。 如果这些导入中的任何一个失败,都会引发 "
281+
":exc:`ModuleNotFoundError`。"
271282

272283
#: ../../reference/import.rst:173
273284
msgid "The module cache"
274-
msgstr ""
285+
msgstr "模块缓存"
275286

276287
#: ../../reference/import.rst:178
277288
msgid ""

0 commit comments

Comments
 (0)