@@ -175,7 +175,7 @@ msgid ""
175175"importlib.reload(modulename)``."
176176msgstr ""
177177"出于效率的考虑,每个模块在单个解释器存续期内只被导入一次。因此,如果您更改了您的模块,您必须重新启动解释器, "
178- "或者,如果您想交互式地测试仅仅一个模块,使用 :func:`importlib.reload`,例如``import importlib; "
178+ "或者,如果您想交互式地测试仅仅一个模块,使用 :func:`importlib.reload`,例如 ``import importlib; "
179179"importlib.reload(modulename)``。"
180180
181181#: ../../tutorial/modules.rst:146
@@ -250,7 +250,7 @@ msgid ""
250250"script is calculated after the symlink is followed. In other words the "
251251"directory containing the symlink is **not** added to the module search path."
252252msgstr ""
253- "在支持符号链接的文件系统上,包含输入脚本的目录是在追加符号链接后才计算出来的。换句话说,包含符号链接的目录并没有被添加到模块的搜索路径上 。 "
253+ "在支持符号链接的文件系统上,包含输入脚本的目录是在追加符号链接后才计算出来的。换句话说,包含符号链接的目录并 **没有** 被添加到模块的搜索路径上 。 "
254254
255255#: ../../tutorial/modules.rst:201
256256msgid ""
@@ -261,13 +261,13 @@ msgid ""
261261"library directory. This is an error unless the replacement is intended. See"
262262" section :ref:`tut-standardmodules` for more information."
263263msgstr ""
264- "在初始化后,Python程序可以更改‘ sys.path' 。包含正在运行脚本的文件目录被放在搜索路径的开头处, "
265- "在标准库路径之前。这意味着此文件目录里的脚本,而非标准库中有同样名称的模块,会载入。 除非有意做这种替代,否则这就是一个失误。更多信息请参阅’tut- "
266- "standardmodules' 。"
264+ "在初始化后,Python程序可以更改 :data:` sys.path` 。包含正在运行脚本的文件目录被放在搜索路径的开头处, "
265+ "在标准库路径之前。这意味着此文件目录里的脚本,而非标准库中有同样名称的模块,会载入。 除非有意做这种替代,否则这就是一个失误。更多信息请参阅 :ref "
266+ ":`tut- standardmodules` 。"
267267
268268#: ../../tutorial/modules.rst:212
269269msgid "\" Compiled\" Python files"
270- msgstr "编译过的Python文件 "
270+ msgstr "“编译过的”Python文件 "
271271
272272#: ../../tutorial/modules.rst:214
273273msgid ""
@@ -280,8 +280,10 @@ msgid ""
280280"allows compiled modules from different releases and different versions of "
281281"Python to coexist."
282282msgstr ""
283- "为了加速模块载入,Python在“__pycache__”目录里缓存了每个模块的编译后版本,其名为‘module.version.pyc’。 "
284- "名称中的版本字段编码了编译文件的格式, 它一般包括Python版本号码。"
283+ "为了加速模块载入,Python在 ``__pycache__`` 目录里缓存了每个模块的编译后版本,名称为 "
284+ ":file:`module.{version}.pyc`。 名称中的版本字段编码了编译文件的格式, "
285+ "它一般使用Python版本号。例如,在CPython版本3.3中,spam.py的编译版本将被缓存为 "
286+ "``__pycache__/spam.cpython-33.pyc``。此命名约定允许来自不同版本的Python的已编译模块共存。"
285287
286288#: ../../tutorial/modules.rst:222
287289msgid ""
@@ -307,7 +309,7 @@ msgstr ""
307309
308310#: ../../tutorial/modules.rst:234
309311msgid "Some tips for experts:"
310- msgstr "给专业人士的一些小建议: "
312+ msgstr "给专业人士的一些小建议: "
311313
312314#: ../../tutorial/modules.rst:236
313315msgid ""
@@ -319,17 +321,17 @@ msgid ""
319321"have an ``opt-`` tag and are usually smaller. Future releases may change "
320322"the effects of optimization."
321323msgstr ""
322- "你可以在Python命令中使用:option:`-O`或者 :option:`-OO`开关, 以减小编译后模块的大小。 ``-O`` 开关去除断言声明, "
323- " ``-OO`` "
324- "开关同时去除断言声明和文档字符串。由于有些程序或许依赖于这些声明和文档,您应当只有在清楚这么做的后果时才使用这个选项。“优化过的”模块有一个``opt-`` "
325- " 标签并且通常小些。将来的发行版本或许会更改优化的效果。"
324+ "你可以在Python命令中使用 :option:`-O` 或者 :option:`-OO` 开关, 以减小编译后模块的大小。 ``-O`` "
325+ "开关去除断言声明, ``-OO`` "
326+ "开关同时去除断言声明和文档字符串。由于有些程序或许依赖于这些声明和文档,您应当只有在清楚这么做的后果时才使用这个选项。“优化过的”模块有一个 "
327+ "``opt-`` 标签并且通常小些。将来的发行版本或许会更改优化的效果。"
326328
327329#: ../../tutorial/modules.rst:244
328330msgid ""
329331"A program doesn't run any faster when it is read from a ``.pyc`` file than "
330332"when it is read from a ``.py`` file; the only thing that's faster about "
331333"``.pyc`` files is the speed with which they are loaded."
332- msgstr "一个从``.pyc``文件读出的程序并不会比它从``.py`` 读出时运行的更快,``.pyc`` 文件唯一快的地方在于载入速度。"
334+ msgstr "一个从 ``.pyc`` 文件读出的程序并不会比它从 ``.py`` 读出时运行的更快,``.pyc`` 文件唯一快的地方在于载入速度。"
333335
334336#: ../../tutorial/modules.rst:248
335337msgid ""
@@ -341,7 +343,7 @@ msgstr ":mod:`compileall` 模块可以为一个目录下的所有模块创建.py
341343msgid ""
342344"There is more detail on this process, including a flow chart of the "
343345"decisions, in :pep:`3147`."
344- msgstr "关于这个过程,:pep:`3147`中有更多细节,包括一个决策流程图。"
346+ msgstr "关于这个过程,:pep:`3147` 中有更多细节,包括一个决策流程图。"
345347
346348#: ../../tutorial/modules.rst:258
347349msgid "Standard Modules"
@@ -361,10 +363,10 @@ msgid ""
361363"into every Python interpreter. The variables ``sys.ps1`` and ``sys.ps2`` "
362364"define the strings used as primary and secondary prompts::"
363365msgstr ""
364- "Python自带一个标准模块的库,它在Python库参考(此处以下称为\" 库参考\" )里另外描述。一些模块是内嵌到编译器里面的 , "
366+ "Python自带一个标准模块的库,它在Python库参考(此处以下称为\" 库参考\" )里另外描述。一些模块是内嵌到解释器里面的 , "
365367"它们给一些虽并非python语言核心但却内嵌的操作提供接口,要么是为了效率,要么是给操作系统基础操作例如系统调入提供接口。这些模块集是一个配置选项, "
366- "并且还依赖于底层的操作系统。例如,:mod:`winreg` "
367- "模块只在Windows操作系统上提供。一个特别值得注意的模块 :mod:`sys`,它被内嵌到每一个Python编译器中。 "
368+ "并且还依赖于底层的操作系统。例如,:mod:`winreg` 模块只在Windows操作系统上提供。一个特别值得注意的模块 "
369+ ":mod:`sys`,它被内嵌到每一个Python解释器中。变量 ``sys.ps1`` 和 ``sys.ps2`` 定义用作主要和次要提示的字符串:: "
368370
369371#: ../../tutorial/modules.rst:285
370372msgid ""
@@ -380,25 +382,24 @@ msgid ""
380382" default if :envvar:`PYTHONPATH` is not set. You can modify it using "
381383"standard list operations::"
382384msgstr ""
383- "``sys.path``变量是一个字符串的列表,它决定了编译器对模块的搜索路径。该变量被初始化为一个来自环境变量:envvar:`PYTHONPATH`的默认路径,如果:envvar:`PYTHONPATH`未设置,则用内置的默认值。您可以用标准列表操作更改它:"
384- " "
385+ "``sys.path`` 变量是一个字符串的列表,它决定了解释器对模块的搜索路径。该变量被初始化为一个来自环境变量 "
386+ ":envvar:`PYTHONPATH` 的默认路径,如果 :envvar:`PYTHONPATH` "
387+ "未设置,则用内置的默认值。您可以用标准列表操作更改它::"
385388
386389#: ../../tutorial/modules.rst:300
387390msgid "The :func:`dir` Function"
388- msgstr " :func:`dir`函数"
391+ msgstr ":func:`dir` 函数"
389392
390393#: ../../tutorial/modules.rst:302
391394msgid ""
392395"The built-in function :func:`dir` is used to find out which names a module "
393396"defines. It returns a sorted list of strings::"
394- msgstr "内置函数:func:`dir`可以用于查找一个模块定义了哪些名称, 它返回一个排序过的字符串列表。 "
397+ msgstr "内置函数 :func:`dir` 可以用于查找一个模块定义了哪些名称, 它返回一个排序过的字符串列表:: "
395398
396399#: ../../tutorial/modules.rst:327
397400msgid ""
398401"Without arguments, :func:`dir` lists the names you have defined currently::"
399- msgstr ""
400- "没有参数时, :func:`dir`列出您当前定义过的名称:\n"
401- " "
402+ msgstr "没有参数时,:func:`dir` 列出您当前定义过的名称::"
402403
403404#: ../../tutorial/modules.rst:335
404405msgid ""
@@ -410,7 +411,7 @@ msgid ""
410411":func:`dir` does not list the names of built-in functions and variables. If"
411412" you want a list of those, they are defined in the standard module "
412413":mod:`builtins`::"
413- msgstr ":func:`dir` 不会列出内置的函数名和变量名。 如果您想要这些,它们的定义是在标准模块:mod:`builtins`::中。 "
414+ msgstr ":func:`dir` 不会列出内置的函数名和变量名。 如果您想要这些,它们的定义是在标准模块:mod:`builtins` 中:: "
414415
415416#: ../../tutorial/modules.rst:378
416417msgid "Packages"
0 commit comments