@@ -39,8 +39,8 @@ msgid ""
3939" that a secondary prompt on a line by itself in an example means you must "
4040"type a blank line; this is used to end a multi-line command."
4141msgstr ""
42- "下面的例子用是否显示提示符 (:term:`>>>` 与 "
43- ":term:`...`)区分输入与输出:输入例子代码时,对于以提示符开头的行,要键入提示符后的所有内容 ;未以提示符开头的行是解释器的输出。注意,例子中的某行出现第二个提示符时,意味着必须键入空白行,这是用来结束多行命令的 。"
42+ "下面的例子以是否显示提示符 (:term:`>>>` 与 "
43+ ":term:`...`)区分输入与输出:输入例子中的代码时,要键入以提示符开头的行中提示符后的所有内容 ;未以提示符开头的行是解释器的输出。注意,例子中的某行出现的第二个提示符是用来结束多行命令的,此时,要键入一个空白行 。"
4444
4545#: ../../tutorial/introduction.rst:16
4646msgid ""
@@ -52,9 +52,9 @@ msgid ""
5252"character. Since comments are to clarify code and are not interpreted by "
5353"Python, they may be omitted when typing in examples."
5454msgstr ""
55- "本手册中的许多例子,甚至交互性命令中都包含注释 。Python 注释以井号 ``#`` "
56- "开头,一直到该物理行结束。注释可以在一行开头 ,或空白符与代码之后,但不能在字符串里面。字符串中的井号就是井号。注释用来阐明代码 ,Python "
57- "不解释注释,因此, 键入例子时,可以不输入注释。"
55+ "本手册中的许多例子,甚至交互式命令都包含注释 。Python 注释以 ``#`` "
56+ "开头,直到该物理行结束。注释可以在行开头 ,或空白符与代码之后,但不能在字符串里面。字符串中的井号就是井号。注释用于阐明代码 ,Python "
57+ "不解释注释,键入例子时,可以不输入注释。"
5858
5959#: ../../tutorial/introduction.rst:24
6060msgid "Some examples::"
@@ -68,7 +68,7 @@ msgstr "Python 用作计算器"
6868msgid ""
6969"Let's try some simple Python commands. Start the interpreter and wait for "
7070"the primary prompt, ``>>>``. (It shouldn't take long.)"
71- msgstr "现在,尝试一些简单的 Python 命令。启动解释器,等待主提示符出现, ``>>>`` (很快就好) 。"
71+ msgstr "现在,尝试一些简单的 Python 命令。启动解释器,等待主提示符( ``>>>`` )出现 。"
7272
7373#: ../../tutorial/introduction.rst:44
7474msgid "Numbers"
@@ -82,7 +82,7 @@ msgid ""
8282"languages (for example, Pascal or C); parentheses (``()``) can be used for "
8383"grouping. For example::"
8484msgstr ""
85- "解释器就像简单的计算器 :输入表达式,就会给出答案。表达式的语法很直接:运算符 ``+``、``-``、``*``、``/`` "
85+ "解释器像一个简单的计算器 :输入表达式,就会给出答案。表达式的语法很直接:运算符 ``+``、``-``、``*``、``/`` "
8686"的用法和其他大部分语言一样(比如,Pascal 或 C);括号 (``()``) 用来分组。例如:"
8787
8888#: ../../tutorial/introduction.rst:61
@@ -100,26 +100,26 @@ msgid ""
100100"get an integer result (discarding any fractional result) you can use the "
101101"``//`` operator; to calculate the remainder you can use ``%``::"
102102msgstr ""
103- "除法运算(``/``)返回浮点数类型 。用 ``//`` 运算符执行 :term:`floor division` "
104- "的结果是整数(忽略小数部分);计算余数用 ``%``:"
103+ "除法运算(``/``)返回浮点数 。用 ``//`` 运算符执行 :term:`floor division` 的结果是整数(忽略小数);计算余数用 "
104+ "``%``:"
105105
106106#: ../../tutorial/introduction.rst:79
107107msgid ""
108108"With Python, it is possible to use the ``**`` operator to calculate powers "
109109"[#]_::"
110- msgstr "Python 使用 ``**`` 运算符计算乘方 [#]_:"
110+ msgstr "Python 用 ``**`` 运算符计算乘方 [#]_:"
111111
112112#: ../../tutorial/introduction.rst:86
113113msgid ""
114114"The equal sign (``=``) is used to assign a value to a variable. Afterwards, "
115115"no result is displayed before the next interactive prompt::"
116- msgstr "等号(``=``)用于给变量赋值。赋值后,不会在下一个交互提示符的位置显示任何结果 :"
116+ msgstr "等号(``=``)用于给变量赋值。赋值后,下一个交互提示符的位置不显示任何结果 :"
117117
118118#: ../../tutorial/introduction.rst:94
119119msgid ""
120120"If a variable is not \" defined\" (assigned a value), trying to use it will "
121121"give you an error::"
122- msgstr "如果变量未定义(即,未赋值),使用该变量时会提示错误 :"
122+ msgstr "如果变量未定义(即,未赋值),使用该变量会提示错误 :"
123123
124124#: ../../tutorial/introduction.rst:102
125125msgid ""
@@ -132,14 +132,14 @@ msgid ""
132132"In interactive mode, the last printed expression is assigned to the variable"
133133" ``_``. This means that when you are using Python as a desk calculator, it "
134134"is somewhat easier to continue calculations, for example::"
135- msgstr "交互模式下,上次输出的表达式会赋给变量 ``_``。即, 把 Python 当作计算器时,实现下一步计算更简单 ,例如:"
135+ msgstr "交互模式下,上次输出的表达式会赋给变量 ``_``。把 Python 当作计算器时,用该变量实现下一步计算更简单 ,例如:"
136136
137137#: ../../tutorial/introduction.rst:121
138138msgid ""
139139"This variable should be treated as read-only by the user. Don't explicitly "
140140"assign a value to it --- you would create an independent local variable with"
141141" the same name masking the built-in variable with its magic behavior."
142- msgstr "最好把这个变量当作只读类型 。不要为它显式赋值 —— 否则会创建一个同名独立局部变量,该变量会用它的魔法行为屏蔽内置变量。"
142+ msgstr "最好把该变量当作只读类型 。不要为它显式赋值, 否则会创建一个同名独立局部变量,该变量会用它的魔法行为屏蔽内置变量。"
143143
144144#: ../../tutorial/introduction.rst:125
145145msgid ""
@@ -151,7 +151,7 @@ msgid ""
151151msgstr ""
152152"除了 :class:`int` 和 :class:`float`,Python 还支持其他数字类型,例如 "
153153":class:`~decimal.Decimal` 或 :class:`~fractions.Fraction`。Python 还内置支持 "
154- ":ref:`复数 <typesnumeric>`,后缀 ``j`` 或 ``J`` 用于表示虚数部分 (例如 ``3+5j`` )。"
154+ ":ref:`复数 <typesnumeric>`,后缀 ``j`` 或 ``J`` 用于表示虚数 (例如 ``3+5j`` )。"
155155
156156#: ../../tutorial/introduction.rst:135
157157msgid "Strings"
@@ -179,7 +179,7 @@ msgid ""
179179"and special characters::"
180180msgstr ""
181181"交互式解释器会为输出的字符串加注引号,特殊字符使用反斜杠转义。虽然,有时输出的字符串看起来与输入的字符串不一样(外加的引号可能会改变),但两个字符串是相同的。如果字符串中有单引号而没有双引号,该字符串外将加注双引号,反之,则加注单引号。:func:`print`"
182- " 函数输出的内容更简洁易读,即,略去两边的引号,并输出经过转义的特殊字符 :"
182+ " 函数输出的内容更简洁易读,它会省略两边的引号,并输出转义后的特殊字符 :"
183183
184184#: ../../tutorial/introduction.rst:175
185185msgid ""
@@ -195,7 +195,7 @@ msgid ""
195195"included in the string, but it's possible to prevent this by adding a ``\\ ``"
196196" at the end of the line. The following example::"
197197msgstr ""
198- "字符串字面值可以跨行连续输入 。实现方式是用三引号:``\"\"\" ...\"\"\" `` 或 "
198+ "字符串字面值可以实现跨行连续输入 。实现方式是用三引号:``\"\"\" ...\"\"\" `` 或 "
199199"``'''...'''``,字符串行尾会自动加上回车换行,如果不需要回车换行,在行尾添加 ``\\ `` 即可。示例如下:"
200200
201201#: ../../tutorial/introduction.rst:196
@@ -208,7 +208,7 @@ msgstr "输出如下(注意,第一行没有换行):"
208208msgid ""
209209"Strings can be concatenated (glued together) with the ``+`` operator, and "
210210"repeated with ``*``::"
211- msgstr "字符串可以用 ``+`` 连接 (粘到一起),也可以用 ``*`` 重复:"
211+ msgstr "字符串可以用 ``+`` 合并 (粘到一起),也可以用 ``*`` 重复:"
212212
213213#: ../../tutorial/introduction.rst:211
214214msgid ""
@@ -283,7 +283,7 @@ msgid ""
283283"from *i* to *j* consists of all characters between the edges labeled *i* and"
284284" *j*, respectively."
285285msgstr ""
286- "第一行数字标注的是字符串中非负索引的位置,第二行数字给出了对应负索引的位置。从 *i* 到 *j* 的切片由 *i* 和 *j* 之间的所有字符组成 。"
286+ "第一行数字是字符串中索引 0...6 的位置,第二行数字是对应的负数索引位置。 *i* 到 *j* 的切片由 *i* 和 *j* 之间所有对应的字符组成 。"
287287
288288#: ../../tutorial/introduction.rst:306
289289msgid ""
0 commit comments