-
-
Notifications
You must be signed in to change notification settings - Fork 91
Expand file tree
/
Copy pathtoplevel_components.po
More file actions
133 lines (115 loc) · 6.26 KB
/
toplevel_components.po
File metadata and controls
133 lines (115 loc) · 6.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Freesand Leo <yuqinju@163.com>, 2019
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-01 16:02+0000\n"
"PO-Revision-Date: 2019-09-01 03:42+0000\n"
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2019\n"
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../reference/toplevel_components.rst:6
msgid "Top-level components"
msgstr "最高层级组件"
#: ../../reference/toplevel_components.rst:10
msgid ""
"The Python interpreter can get its input from a number of sources: from a "
"script passed to it as standard input or as program argument, typed in "
"interactively, from a module source file, etc. This chapter gives the "
"syntax used in these cases."
msgstr ""
"Python 解释器可以从多种源获得输入:作为标准输入或程序参数传入的脚本,以交互方式键入的语句,导入的模块源文件等等。 "
"这一章将给出在这些情况下所用的语法。"
#: ../../reference/toplevel_components.rst:19
msgid "Complete Python programs"
msgstr "完整的 Python 程序"
#: ../../reference/toplevel_components.rst:28
msgid ""
"While a language specification need not prescribe how the language "
"interpreter is invoked, it is useful to have a notion of a complete Python "
"program. A complete Python program is executed in a minimally initialized "
"environment: all built-in and standard modules are available, but none have "
"been initialized, except for :mod:`sys` (various system services), "
":mod:`builtins` (built-in functions, exceptions and ``None``) and "
":mod:`__main__`. The latter is used to provide the local and global "
"namespace for execution of the complete program."
msgstr ""
"虽然语言规范描述不必规定如何发起调用语言解释器,但对完整的 Python 程序加以说明还是很有用的。 一个完整的 Python "
"程序会在最小初始化环境中被执行:所有内置和标准模块均为可用,但均处于未初始化状态,只有 :mod:`sys` (各种系统服务), "
":mod:`builtins` (内置函数、异常以及 ``None``) 和 :mod:`__main__` 除外。 "
"最后一个模块用于为完整程序的执行提供局部和全局命名空间。"
#: ../../reference/toplevel_components.rst:36
msgid ""
"The syntax for a complete Python program is that for file input, described "
"in the next section."
msgstr "适用于一个完整 Python 程序的语法即下节所描述的文件输入。"
#: ../../reference/toplevel_components.rst:43
msgid ""
"The interpreter may also be invoked in interactive mode; in this case, it "
"does not read and execute a complete program but reads and executes one "
"statement (possibly compound) at a time. The initial environment is "
"identical to that of a complete program; each statement is executed in the "
"namespace of :mod:`__main__`."
msgstr ""
"解释器也可以通过交互模式被发起调用;在此情况下,它并不读取和执行一个完整程序,而是每次读取和执行一条语句(可能为复合语句)。 "
"此时的初始环境与一个完整程序的相同;每条语句会在 :mod:`__main__` 的命名空间中被执行。"
#: ../../reference/toplevel_components.rst:55
msgid ""
"A complete program can be passed to the interpreter in three forms: with the"
" :option:`-c` *string* command line option, as a file passed as the first "
"command line argument, or as standard input. If the file or standard input "
"is a tty device, the interpreter enters interactive mode; otherwise, it "
"executes the file as a complete program."
msgstr ""
"一个完整程序可通过三种形式被传递给解释器:使用 :option:`-c` *字符串* 命令行选项,使用一个文件作为第一个命令行参数,或者使用标准输入。 "
"如果文件或标准输入是一个 tty 设置,解释器会进入交互模式;否则的话,它会将文件当作一个完整程序来执行。"
#: ../../reference/toplevel_components.rst:65
msgid "File input"
msgstr "文件输入"
#: ../../reference/toplevel_components.rst:67
msgid "All input read from non-interactive files has the same form:"
msgstr "所有从非交互式文件读取的输入都具有相同的形式:"
#: ../../reference/toplevel_components.rst:72
msgid "This syntax is used in the following situations:"
msgstr "此语法用于下列几种情况:"
#: ../../reference/toplevel_components.rst:74
msgid "when parsing a complete Python program (from a file or from a string);"
msgstr "解析一个完整 Python 程序时(从文件或字符串);"
#: ../../reference/toplevel_components.rst:76
msgid "when parsing a module;"
msgstr "解析一个模块时;"
#: ../../reference/toplevel_components.rst:78
msgid "when parsing a string passed to the :func:`exec` function;"
msgstr "解析一个传递给 :func:`exec` 函数的字符串时;"
#: ../../reference/toplevel_components.rst:84
msgid "Interactive input"
msgstr "交互式输入"
#: ../../reference/toplevel_components.rst:86
msgid "Input in interactive mode is parsed using the following grammar:"
msgstr "交互模式下的输入使用以下语法进行解析:"
#: ../../reference/toplevel_components.rst:91
msgid ""
"Note that a (top-level) compound statement must be followed by a blank line "
"in interactive mode; this is needed to help the parser detect the end of the"
" input."
msgstr "请注意在交互模式下一条(最高层级)复合语句必须带有一个空行;这对于帮助解析器确定输入的结束是必须的。"
#: ../../reference/toplevel_components.rst:98
msgid "Expression input"
msgstr "表达式输入"
#: ../../reference/toplevel_components.rst:103
msgid ""
":func:`eval` is used for expression input. It ignores leading whitespace. "
"The string argument to :func:`eval` must have the following form:"
msgstr ":func:`eval` 被用于表达式输入。 它会忽略开头的空白。 传递给 :func:`eval` 的字符串参数必须具有以下形式:"