Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8c34788

Browse files
[po] auto sync
1 parent 64659e4 commit 8c34788

2 files changed

Lines changed: 31 additions & 30 deletions

File tree

tutorial/controlflow.po

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Junkai Shao <[email protected]>, 2018
1111
# zkonge <[email protected]>, 2019
1212
# ppcfish <[email protected]>, 2019
13-
# Freesand Leo <[email protected]>, 2020
13+
# Freesand Leo <[email protected]>, 2019
1414
# jaystone776 <[email protected]>, 2021
1515
#
1616
#, fuzzy
@@ -36,7 +36,7 @@ msgstr "其他流程控制工具"
3636
msgid ""
3737
"Besides the :keyword:`while` statement just introduced, Python uses the "
3838
"usual flow control statements known from other languages, with some twists."
39-
msgstr "除了上一章介绍的 :keyword:`while` 语句,Python 还使用其他语言中常用的流程控制语句,只是稍有变化。"
39+
msgstr "除了上一章介绍的 :keyword:`while` 语句,Python 还支持其他语言中常见的流程控制语句,只是稍有不同。"
4040

4141
#: ../../tutorial/controlflow.rst:14
4242
msgid ":keyword:`!if` Statements"
@@ -692,8 +692,8 @@ msgid ""
692692
"``*args`` parameter are 'keyword-only' arguments, meaning that they can only"
693693
" be used as keywords rather than positional arguments. ::"
694694
msgstr ""
695-
"这些 ``variadic`` 实参用于采集传递给函数的所有剩余实参,因此,它们通常在形参列表的末尾。* args "
696-
"形参后出现的任何形参都是仅限关键字参数,即只能用作关键字参数,不能用作位置参数:"
695+
"``variadic`` 实参用于采集传递给函数的所有剩余实参,因此,它们通常在形参列表的末尾。``*args`` "
696+
"形参后的任何形式参数只能是仅限关键字参数,即只能用作关键字参数,不能用作位置参数:"
697697

698698
#: ../../tutorial/controlflow.rst:734
699699
msgid "Unpacking Argument Lists"
@@ -708,14 +708,14 @@ msgid ""
708708
"separately, write the function call with the ``*``\\ -operator to unpack "
709709
"the arguments out of a list or tuple::"
710710
msgstr ""
711-
"当参数已经在列表或元组中但要为需要单独位置参数的函数调用解包时,会发生相反的情况。例如,内置的 :func:`range` 函数需要单独的 "
712-
"*start* 和 *stop* 参数。如果它们不能单独使用,可以使用 ``*`` 操作符 来编写函数调用以便从列表或元组中解包参数::"
711+
"函数调用要求独立的位置参数,但实参在列表或元组里时,要执行相反的操作。例如,内置的 :func:`range` 函数要求独立的 *start* 和 "
712+
"*stop* 实参。如果这些参数不是独立的,则要在调用函数时,用 ``*`` 操作符把实参从列表或元组解包出来:"
713713

714714
#: ../../tutorial/controlflow.rst:752
715715
msgid ""
716716
"In the same fashion, dictionaries can deliver keyword arguments with the "
717717
"``**``\\ -operator::"
718-
msgstr "同样的方式,字典可使用 ``**`` 操作符 来提供关键字参数::"
718+
msgstr "同样,字典可以用 ``**`` 操作符传递关键字参数:"
719719

720720
#: ../../tutorial/controlflow.rst:768
721721
msgid "Lambda Expressions"
@@ -731,14 +731,15 @@ msgid ""
731731
"function definitions, lambda functions can reference variables from the "
732732
"containing scope::"
733733
msgstr ""
734-
"可以用 :keyword:`lambda` 关键字来创建一个小的匿名函数。这个函数返回两个参数的和: ``lambda a, b: a+b`` "
735-
"。Lambda函数可以在需要函数对象的任何地方使用。它们在语法上限于单个表达式。从语义上来说,它们只是正常函数定义的语法糖。与嵌套函数定义一样,lambda函数可以引用所包含域的变量::"
734+
":keyword:`lambda` 关键字用于创建小巧的匿名函数。``lambda a, b: a+b`` 函数返回两个参数的和。Lambda "
735+
"函数可用于任何需要函数对象的地方。在语法上,匿名函数只能是单个表达式。在语义上,它只是常规函数定义的语法糖。与嵌套函数定义一样,lambda "
736+
"函数可以引用包含作用域中的变量:"
736737

737738
#: ../../tutorial/controlflow.rst:787
738739
msgid ""
739740
"The above example uses a lambda expression to return a function. Another "
740741
"use is to pass a small function as an argument::"
741-
msgstr "上面的例子使用一个lambda表达式来返回一个函数。另一个用法是传递一个小函数作为参数::"
742+
msgstr "上例用 lambda 表达式返回函数。还可以把匿名函数用作传递的实参:"
742743

743744
#: ../../tutorial/controlflow.rst:799
744745
msgid "Documentation Strings"
@@ -748,7 +749,7 @@ msgstr "文档字符串"
748749
msgid ""
749750
"Here are some conventions about the content and formatting of documentation "
750751
"strings."
751-
msgstr "以下是有关文档字符串的内容和格式的一些约定。"
752+
msgstr "以下是文档字符串内容和格式的约定。"
752753

753754
#: ../../tutorial/controlflow.rst:809
754755
msgid ""

tutorial/introduction.po

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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."
4141
msgstr ""
42-
"下面的例子用是否显示提示符(:term:`>>>` 与 "
43-
":term:`...`)区分输入与输出:输入例子代码时,对于以提示符开头的行,要键入提示符后的所有内容;未以提示符开头的行是解释器的输出。注意,例子中的某行出现第二个提示符时,意味着必须键入空白行,这是用来结束多行命令的。"
42+
"下面的例子以是否显示提示符(:term:`>>>` 与 "
43+
":term:`...`)区分输入与输出:输入例子中的代码时,要键入以提示符开头的行中提示符后的所有内容;未以提示符开头的行是解释器的输出。注意,例子中的某行出现的第二个提示符是用来结束多行命令的,此时,要键入一个空白行。"
4444

4545
#: ../../tutorial/introduction.rst:16
4646
msgid ""
@@ -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."
5454
msgstr ""
55-
"本手册中的许多例子,甚至交互性命令中都包含注释。Python 注释以井号 ``#`` "
56-
"开头,一直到该物理行结束。注释可以在一行开头,或空白符与代码之后,但不能在字符串里面。字符串中的井号就是井号。注释用来阐明代码,Python "
57-
"不解释注释,因此,键入例子时,可以不输入注释。"
55+
"本手册中的许多例子,甚至交互式命令都包含注释。Python 注释以 ``#`` "
56+
"开头,直到该物理行结束。注释可以在行开头,或空白符与代码之后,但不能在字符串里面。字符串中的井号就是井号。注释用于阐明代码,Python "
57+
"不解释注释,键入例子时,可以不输入注释。"
5858

5959
#: ../../tutorial/introduction.rst:24
6060
msgid "Some examples::"
@@ -68,7 +68,7 @@ msgstr "Python 用作计算器"
6868
msgid ""
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
7474
msgid "Numbers"
@@ -82,7 +82,7 @@ msgid ""
8282
"languages (for example, Pascal or C); parentheses (``()``) can be used for "
8383
"grouping. For example::"
8484
msgstr ""
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 ``%``::"
102102
msgstr ""
103-
"除法运算(``/``)返回浮点数类型。用 ``//`` 运算符执行 :term:`floor division` "
104-
"的结果是整数(忽略小数部分);计算余数用 ``%``:"
103+
"除法运算(``/``)返回浮点数。用 ``//`` 运算符执行 :term:`floor division` 的结果是整数(忽略小数);计算余数用 "
104+
"``%``:"
105105

106106
#: ../../tutorial/introduction.rst:79
107107
msgid ""
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
113113
msgid ""
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
119119
msgid ""
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
125125
msgid ""
@@ -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
138138
msgid ""
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
145145
msgid ""
@@ -151,7 +151,7 @@ msgid ""
151151
msgstr ""
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
157157
msgid "Strings"
@@ -179,7 +179,7 @@ msgid ""
179179
"and special characters::"
180180
msgstr ""
181181
"交互式解释器会为输出的字符串加注引号,特殊字符使用反斜杠转义。虽然,有时输出的字符串看起来与输入的字符串不一样(外加的引号可能会改变),但两个字符串是相同的。如果字符串中有单引号而没有双引号,该字符串外将加注双引号,反之,则加注单引号。:func:`print`"
182-
" 函数输出的内容更简洁易读,即,略去两边的引号,并输出经过转义的特殊字符:"
182+
" 函数输出的内容更简洁易读,它会省略两边的引号,并输出转义后的特殊字符:"
183183

184184
#: ../../tutorial/introduction.rst:175
185185
msgid ""
@@ -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::"
197197
msgstr ""
198-
"字符串字面值可以跨行连续输入。实现方式是用三引号:``\"\"\"...\"\"\"`` 或 "
198+
"字符串字面值可以实现跨行连续输入。实现方式是用三引号:``\"\"\"...\"\"\"`` 或 "
199199
"``'''...'''``,字符串行尾会自动加上回车换行,如果不需要回车换行,在行尾添加 ``\\`` 即可。示例如下:"
200200

201201
#: ../../tutorial/introduction.rst:196
@@ -208,7 +208,7 @@ msgstr "输出如下(注意,第一行没有换行):"
208208
msgid ""
209209
"Strings can be concatenated (glued together) with the ``+`` operator, and "
210210
"repeated with ``*``::"
211-
msgstr "字符串可以用 ``+`` 连接(粘到一起),也可以用 ``*`` 重复:"
211+
msgstr "字符串可以用 ``+`` 合并(粘到一起),也可以用 ``*`` 重复:"
212212

213213
#: ../../tutorial/introduction.rst:211
214214
msgid ""
@@ -283,7 +283,7 @@ msgid ""
283283
"from *i* to *j* consists of all characters between the edges labeled *i* and"
284284
" *j*, respectively."
285285
msgstr ""
286-
"第一行数字标注的是字符串中非负索引的位置,第二行数字给出了对应负索引的位置。从 *i* 到 *j* 的切片由 *i* 和 *j* 之间的所有字符组成。"
286+
"第一行数字是字符串中索引 0...6 的位置,第二行数字是对应的负数索引位置。*i* 到 *j* 的切片由 *i* 和 *j* 之间所有对应的字符组成。"
287287

288288
#: ../../tutorial/introduction.rst:306
289289
msgid ""

0 commit comments

Comments
 (0)