11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2023 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Rafael Fontenelle <[email protected] >, 2023 7+ # Rafael Fontenelle <[email protected] >, 2024 88#
99#, fuzzy
1010msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.10\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2023-07-29 03:05 +0000\n "
14+ "POT-Creation-Date : 2024-02-16 18:51 +0000\n "
1515"PO-Revision-Date : 2022-11-05 17:21+0000\n "
16- "
Last-Translator :
Rafael Fontenelle <[email protected] >, 2023 \n "
16+ "
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024 \n "
1717"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1818"MIME-Version : 1.0\n "
1919"Content-Type : text/plain; charset=UTF-8\n "
@@ -23,23 +23,23 @@ msgstr ""
2323
2424#: ../../library/__main__.rst:2
2525msgid ":mod:`__main__` --- Top-level code environment"
26- msgstr ":mod:`__main__` --- 最高层级代码环境 "
26+ msgstr ":mod:`__main__` ——顶层代码环境 "
2727
2828#: ../../library/__main__.rst:10
2929msgid ""
3030"In Python, the special name ``__main__`` is used for two important "
3131"constructs:"
32- msgstr "在 Python 中,特殊名称 ``__main__`` 被用于两个重要的构造: "
32+ msgstr "Python 的特殊名 ``__main__`` 用于两个重要的构造: "
3333
3434#: ../../library/__main__.rst:12
3535msgid ""
3636"the name of the top-level environment of the program, which can be checked "
3737"using the ``__name__ == '__main__'`` expression; and"
38- msgstr "程序的最高层级环境的名称,可以使用 ``__name__ == '__main__'`` 表达式来检查它 ;以及"
38+ msgstr "程序的顶层环境的名称,可用表达式 ``__name__ == '__main__'`` 来检查 ;以及"
3939
4040#: ../../library/__main__.rst:14
4141msgid "the ``__main__.py`` file in Python packages."
42- msgstr "Python 包中的 ``__main__.py`` 文件 。"
42+ msgstr "Python 包中的文件 ``__main__.py``。"
4343
4444#: ../../library/__main__.rst:16
4545msgid ""
@@ -48,8 +48,8 @@ msgid ""
4848"detail below. If you're new to Python modules, see the tutorial section "
4949":ref:`tut-modules` for an introduction."
5050msgstr ""
51- "这两种机制都有 Python 模块有关;用户如何与它们交互以及它们之间如何交互。 下文将进行详细说明。 如果你还不了解 Python 模块,请查看教程 "
52- ":ref:`tut-modules` 一节的介绍 。"
51+ "这两个机制都与 Python 模块相关——用户与它们如何交互,及它们之间如何交互——下文详述。而教程的 :ref:`tut-modules` "
52+ "一节则为初学者介绍了 Python 模块 。"
5353
5454#: ../../library/__main__.rst:25
5555msgid "``__name__ == '__main__'``"
@@ -61,24 +61,23 @@ msgid ""
6161"module's name. Usually, this is the name of the Python file itself without "
6262"the ``.py`` extension::"
6363msgstr ""
64- "当一个 Python 模块或包被导入时,``__name__`` 会被设为模块的名称。 通常,这将是 Python 文件本身的名称去掉 ``.py`` "
65- "后缀::"
64+ "当一个 Python 模块或包被导入时,``__name__`` 被设为模块的名称——通常为 Python 文件本身的名称去掉 ``.py`` 后缀:"
6665
6766#: ../../library/__main__.rst:35
6867msgid ""
6968"If the file is part of a package, ``__name__`` will also include the parent "
7069"package's path::"
71- msgstr "如果文件是包的组成部分 ,则 ``__name__`` 还将包括父包的路径:: "
70+ msgstr "如果文件是包的一部分 ,则 ``__name__`` 还将包括父包的路径: "
7271
7372#: ../../library/__main__.rst:42
7473msgid ""
7574"However, if the module is executed in the top-level code environment, its "
7675"``__name__`` is set to the string ``'__main__'``."
77- msgstr "不过,如果模块是在最高层级代码环境中执行的,则它的 ``__name__`` 会被设为字符串 ``'__main__'``。"
76+ msgstr "而若模块是在顶层代码环境中执行的,则其 ``__name__`` 被设为字符串 ``'__main__'``。"
7877
7978#: ../../library/__main__.rst:46
8079msgid "What is the \" top-level code environment\" ?"
81- msgstr "什么是“最高层级代码环境 ”?"
80+ msgstr "什么是“顶层代码环境 ”?"
8281
8382#: ../../library/__main__.rst:48
8483msgid ""
@@ -88,61 +87,59 @@ msgid ""
8887"program needs. Sometimes \" top-level code\" is called an *entry point* to "
8988"the application."
9089msgstr ""
91- "``__main__`` 是最高层级代码运行所在环境的名称。 “最高层级代码”即用户指定最先启动运行的 Python 模块。 "
92- "它被称为“最高层级”是因为它将导入程序所需的所有其他模块。 有时“最高层级代码”也被称为应用的 *入口点*。"
90+ "``__main__`` 是顶层代码运行环境的名称。“顶层代码”是指由用户指定的最先开始运行的那一个 Python "
91+ "模块。之所以它是“顶层”,是因为它将导入程序所需的所有其它模块。 有时“顶层代码”被称为应用程序的 *入口点*。"
9392
9493#: ../../library/__main__.rst:53
9594msgid "The top-level code environment can be:"
96- msgstr "最高层级代码环境可以是: "
95+ msgstr "顶层代码环境可以是: "
9796
9897#: ../../library/__main__.rst:55
9998msgid "the scope of an interactive prompt::"
100- msgstr "一个交互提示符的作用域:: "
99+ msgstr "交互提示符的作用域: "
101100
102101#: ../../library/__main__.rst:60
103102msgid "the Python module passed to the Python interpreter as a file argument:"
104- msgstr "作为文件参数传给 Python 解释器的 Python 模块: "
103+ msgstr "作为文件参数传给 Python 解释器的 Python 模块: "
105104
106105#: ../../library/__main__.rst:67
107106msgid ""
108107"the Python module or package passed to the Python interpreter with the "
109108":option:`-m` argument:"
110- msgstr "作为 :option:`-m` 参数传给 Python 解释器的 Python 模块或包: "
109+ msgstr "与 :option:`-m` 一起传给 Python 解释器的 Python 模块或包: "
111110
112111#: ../../library/__main__.rst:75
113112msgid "Python code read by the Python interpreter from standard input:"
114- msgstr "Python 解释器从标准输入中读取的 Python 代码: "
113+ msgstr "Python 解释器从标准输入中读取的 Python 代码: "
115114
116115#: ../../library/__main__.rst:86
117116msgid ""
118117"Python code passed to the Python interpreter with the :option:`-c` argument:"
119- msgstr "作为 :option:`-c` 参数传递给 Python 解释器的 Python 代码: "
118+ msgstr "与 :option:`-c` 一起传给 Python 解释器的 Python 代码: "
120119
121120#: ../../library/__main__.rst:97
122121msgid ""
123122"In each of these situations, the top-level module's ``__name__`` is set to "
124123"``'__main__'``."
125- msgstr "在以上每个情形中,顶级模块的 ``__name__`` 被设置为 ``'__main__'`` 。"
124+ msgstr "上述每种情况中的顶层模块的 ``__name__`` 被设为 ``'__main__'``。"
126125
127126#: ../../library/__main__.rst:100
128127msgid ""
129128"As a result, a module can discover whether or not it is running in the top-"
130129"level environment by checking its own ``__name__``, which allows a common "
131130"idiom for conditionally executing code when the module is not initialized "
132131"from an import statement::"
133- msgstr ""
134- "因此,一个模块可以通过检查自己的 ``__name__`` "
135- ",来发现它是否在顶层环境中运行。这是允许在模块没有从导入语句中初始化的情况下,有条件地执行代码的一个常见的语句::"
132+ msgstr "作为结果,模块通过检查自己的 ``__name__`` 可发现自己是否运行于顶层环境,使一些代码仅当模块不是被导入语句初始化的时候才执行:"
136133
137134#: ../../library/__main__.rst:111
138135msgid ""
139136"For a more detailed look at how ``__name__`` is set in all situations, see "
140137"the tutorial section :ref:`tut-modules`."
141- msgstr "关于在所有情况下 ``__name__`` 是如何设置的细节,请看教程部分 :ref:`tut-modules` 。"
138+ msgstr "关于在所有情况下 ``__name__`` 是被如何设置的,详见教程的 :ref:`tut-modules` 一节 。"
142139
143140#: ../../library/__main__.rst:116 ../../library/__main__.rst:239
144141msgid "Idiomatic Usage"
145- msgstr "常见用法 "
142+ msgstr "惯用法 "
146143
147144#: ../../library/__main__.rst:118
148145msgid ""
0 commit comments