1212# ppcfish <[email protected] >, 20191313# Freesand Leo <[email protected] >, 2020141415+ # jaystone776 <[email protected] >, 20211516#
1617#, fuzzy
1718msgid ""
@@ -20,7 +21,7 @@ msgstr ""
2021"Report-Msgid-Bugs-To : \n "
2122"POT-Creation-Date : 2021-01-01 05:02+0000\n "
2223"PO-Revision-Date : 2017-02-16 23:40+0000\n "
23- "
Last-Translator :
Hissy <[email protected] >, 2020 \n"
24+ "
Last-Translator :
jaystone776 <[email protected] >, 2021 \n"
2425"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2526"MIME-Version : 1.0\n "
2627"Content-Type : text/plain; charset=UTF-8\n "
@@ -56,10 +57,10 @@ msgid ""
5657":keyword:`!elif` ... :keyword:`!elif` ... sequence is a substitute for the "
5758"``switch`` or ``case`` statements found in other languages."
5859msgstr ""
59- "可以有零个或多个 :keyword:`elif` 部分,以及一个可选的 :keyword:`else` 部分。 关键字 "
60- "':keyword:`!elif`' 是 'else if' 的缩写,适合用于避免过多的缩进。 一个 :keyword:`!if` ... "
61- ":keyword:`!elif` ... :keyword:`!elif` ... 序列可以看作是其他语言中的 ``switch`` 或 "
62- "``case`` 语句的替代 。"
60+ "if 语句包含零个或多个 :keyword:`elif` 子句,及可选的 :keyword:`else` 子句。 关键字 "
61+ "':keyword:`!elif`' 是 'else if' 的缩写,适合用于避免过多的缩进。可以把 :keyword:`!if` ... "
62+ ":keyword:`!elif` ... :keyword:`!elif` ... 序列看作是其他语言中 ``switch`` 或 ``case`` "
63+ "语句的替代品 。"
6364
6465#: ../../tutorial/controlflow.rst:43
6566msgid ":keyword:`!for` Statements"
@@ -75,16 +76,16 @@ msgid ""
7576" a string), in the order that they appear in the sequence. For example (no "
7677"pun intended):"
7778msgstr ""
78- "Python 中的 :keyword:`for` 语句与你在 C 或 Pascal 中所用到的有所不同。 Python 中的 "
79- ":keyword:`!for` 语句并不总是对算术递增的数值进行迭代 (如同 Pascal),或是给予用户定义迭代步骤和暂停条件的能力(如同 "
80- "C),而是对任意序列进行迭代(例如列表或字符串 ),条目的迭代顺序与它们在序列中出现的顺序一致。 例如(此处英文为双关语):"
79+ "Python 的 :keyword:`for` 语句与在 C 或 Pascal 中不同。 Python 的 :keyword:`!for` "
80+ "语句并不对算术递增的数值进行迭代 (如同 Pascal),或是给予用户定义迭代步骤和暂停条件的能力(如同 "
81+ "C),而是对任意序列进行迭代(例如,列表或字符串 ),条目的迭代顺序与它们在序列中出现的顺序一致。 例如(此处英文为双关语):"
8182
8283#: ../../tutorial/controlflow.rst:69
8384msgid ""
8485"Code that modifies a collection while iterating over that same collection "
8586"can be tricky to get right. Instead, it is usually more straight-forward to"
8687" loop over a copy of the collection or to create a new collection::"
87- msgstr "在遍历同一个集合时修改该集合的代码可能很难获得正确的结果。通常,更直接的做法是循环遍历该集合的副本或创建新集合 :"
88+ msgstr "遍历同集合的同时修改该集合的内容,这样代码很难得到正确的结果。要实现这个目的,应该循环遍历该集合的副本或创建新的集合 :"
8889
8990#: ../../tutorial/controlflow.rst:88
9091msgid "The :func:`range` Function"
@@ -94,7 +95,7 @@ msgstr ":func:`range` 函数"
9495msgid ""
9596"If you do need to iterate over a sequence of numbers, the built-in function "
9697":func:`range` comes in handy. It generates arithmetic progressions::"
97- msgstr "如果你确实需要遍历一个数字序列,内置函数 :func:`range` 会派上用场。它生成算术级数:: "
98+ msgstr "遍历数字序列,常用内置函数 :func:`range`。该函数可以生成算术级数: "
9899
99100#: ../../tutorial/controlflow.rst:102
100101msgid ""
@@ -103,25 +104,24 @@ msgid ""
103104" It is possible to let the range start at another number, or to specify a "
104105"different increment (even negative; sometimes this is called the 'step')::"
105106msgstr ""
106- "给定的终止数值并不在要生成的序列里;``range(10)`` "
107- "会生成10个值,并且是以合法的索引生成一个长度为10的序列。range也可以以另一个数字开头,或者以指定的幅度增加(甚至是负数;有时这也被叫做 "
108- "'步进') ::"
107+ "生成的序列不包含给定的终止数值;``range(10)`` 生成 10 个值,这是一个长度为 10 的序列,其中的元素索引都是合法的。range "
108+ "也能以另一个数字开头,或以指定的幅度递增(该幅度也可以是负数;称为 '步进') :"
109109
110110#: ../../tutorial/controlflow.rst:116
111111msgid ""
112112"To iterate over the indices of a sequence, you can combine :func:`range` and"
113113" :func:`len` as follows::"
114- msgstr "要以序列的索引来迭代,您可以将 :func:`range` 和 :func:`len` 组合如下:: "
114+ msgstr "要按索引迭代序列,可以把 :func:`range` 和 :func:`len` 组合如下: "
115115
116116#: ../../tutorial/controlflow.rst:129
117117msgid ""
118118"In most such cases, however, it is convenient to use the :func:`enumerate` "
119119"function, see :ref:`tut-loopidioms`."
120- msgstr "然而,在大多数这类情况下 ,使用 :func:`enumerate` 函数比较方便,请参见 :ref:`tut-loopidioms` 。"
120+ msgstr "不过,大多数情况下 ,使用 :func:`enumerate` 函数更便捷,请参阅 :ref:`tut-loopidioms` 。"
121121
122122#: ../../tutorial/controlflow.rst:132
123123msgid "A strange thing happens if you just print a range::"
124- msgstr "如果你只打印 range,会出现奇怪的结果:: "
124+ msgstr "如果只输出 range,会出现奇怪的结果: "
125125
126126#: ../../tutorial/controlflow.rst:137
127127msgid ""
@@ -130,8 +130,8 @@ msgid ""
130130"items of the desired sequence when you iterate over it, but it doesn't "
131131"really make the list, thus saving space."
132132msgstr ""
133- ":func:`range` "
134- "所返回的对象在许多方面表现得像一个列表,但实际上却并不是。此对象会在你迭代它时基于所希望的序列返回连续的项,但它没有真正生成列表,这样就能节省空间 。"
133+ "在许多方面, :func:`range` "
134+ "返回对象的操作很像列表,但其实不然。在迭代时,该对象基于所需序列返回连续项,并没有生成真正的列表,从而节省了空间 。"
135135
136136#: ../../tutorial/controlflow.rst:142
137137msgid ""
0 commit comments