@@ -329,7 +329,7 @@ msgstr "使用 :func:`importlib.reload` 来代替。"
329329msgid ""
330330"The following functions are conveniences for handling :pep:`3147` byte-"
331331"compiled file paths."
332- msgstr ""
332+ msgstr "下列函数可以方便地处理 :pep:`3147` 字节编译的文件路径。 "
333333
334334#: ../../library/imp.rst:203
335335msgid ""
@@ -342,24 +342,32 @@ msgid ""
342342"``False`` for *debug_override* you can override the system's value for "
343343"``__debug__``, leading to optimized bytecode."
344344msgstr ""
345+ "返回与源 :pep:`3147` 定义的 *path* 相关联的已编译字节码文件的路径。 举例来说,如果 *path* 为 "
346+ "``/foo/bar/baz.py`` 则 Python 3.2 中的返回值将是 "
347+ "``/foo/bar/__pycache__/baz.cpython-32.pyc``。 字符串 ``cpython-32`` 来自于当前的魔术标签 "
348+ "(参见 :func:`get_tag`; 如果 :attr:`sys.implementation.cache_tag` 未定义则将引发 "
349+ ":exc:`NotImplementedError`)。 通过为 *debug_override* 传入 ``True`` 或 ``False`` "
350+ "你可以覆盖系统设置的 ``__debug__`` 值,以生成优化的字节码。"
345351
346352#: ../../library/imp.rst:212
347353msgid "*path* need not exist."
348- msgstr ""
354+ msgstr "*path* 不必存在。 "
349355
350356#: ../../library/imp.rst:214
351357msgid ""
352358"If :attr:`sys.implementation.cache_tag` is ``None``, then "
353359":exc:`NotImplementedError` is raised."
354360msgstr ""
361+ "如果 :attr:`sys.implementation.cache_tag` 为 ``None``,则会引发 "
362+ ":exc:`NotImplementedError`。"
355363
356364#: ../../library/imp.rst:218
357365msgid "Use :func:`importlib.util.cache_from_source` instead."
358- msgstr ""
366+ msgstr "使用 :func:`importlib.util.cache_from_source` 来代替。 "
359367
360368#: ../../library/imp.rst:221
361369msgid "The *debug_override* parameter no longer creates a ``.pyo`` file."
362- msgstr ""
370+ msgstr "*debug_override* 形参不会再创建 ``.pyo`` 文件。 "
363371
364372#: ../../library/imp.rst:227
365373msgid ""
@@ -371,22 +379,27 @@ msgid ""
371379":attr:`sys.implementation.cache_tag` is not defined, "
372380":exc:`NotImplementedError` is raised."
373381msgstr ""
382+ "根据给定的 :pep:`3147` 文件名的 *path*,返回相关联的源代码文件路径。 举例来说,如果 *path* 为 "
383+ "``/foo/bar/__pycache__/baz.cpython-32.pyc`` 则返回的路径将是 ``/foo/bar/baz.py``。 "
384+ "*path* 不必已存在,但是如果它未遵循 :pep:`3147` 格式,则会引发 :exc:`ValueError`。 如果未定义 "
385+ ":attr:`sys.implementation.cache_tag`,则会引发 :exc:`NotImplementedError`。"
374386
375387#: ../../library/imp.rst:235
376388msgid ""
377389"Raise :exc:`NotImplementedError` when :attr:`sys.implementation.cache_tag` "
378390"is not defined."
379391msgstr ""
392+ "当未定义 :attr:`sys.implementation.cache_tag` 时将引发 :exc:`NotImplementedError`。"
380393
381394#: ../../library/imp.rst:239
382395msgid "Use :func:`importlib.util.source_from_cache` instead."
383- msgstr ""
396+ msgstr "使用 :func:`importlib.util.source_from_cache` 来代替。 "
384397
385398#: ../../library/imp.rst:245
386399msgid ""
387400"Return the :pep:`3147` magic tag string matching this version of Python's "
388401"magic number, as returned by :func:`get_magic`."
389- msgstr ""
402+ msgstr "返回与此 Python 版本魔数相匹配的 :pep:`3147` 魔术标签字符串,如 :func:`get_magic` 所返回的。 "
390403
391404#: ../../library/imp.rst:248
392405msgid ""
0 commit comments