Skip to content

Commit 64ec620

Browse files
[po] auto sync
1 parent 096169c commit 64ec620

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tutorial/datastructures.po

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,13 @@ msgid ""
176176
"list are fast, doing inserts or pops from the beginning of a list is slow "
177177
"(because all of the other elements have to be shifted by one)."
178178
msgstr ""
179-
"列表也可以用作队列,其中先添加的元素被最先取出 "
180-
"(“先进先出”);然而列表用作这个目的相当低效。因为在列表的末尾添加和弹出元素非常快,但是在列表的开头插入或弹出元素却很慢 "
181-
"(因为所有的其他元素都必须移动一位)。"
179+
"列表也可以用作队列,最先加入的元素,最先取出(“先进先出”);然而,列表作为队列的效率很低。因为,在列表末尾添加和删除元素非常快,但在列表开头插入或移除元素却很慢(因为所有其他元素都必须移动一位)。"
182180

183181
#: ../../tutorial/datastructures.rst:179
184182
msgid ""
185183
"To implement a queue, use :class:`collections.deque` which was designed to "
186184
"have fast appends and pops from both ends. For example::"
187-
msgstr "若要实现一个队列, :class:`collections.deque` 被设计用于快速地从两端操作。例如 ::"
185+
msgstr "实现队列最好用 :class:`collections.deque`,可以快速从两端添加或删除元素。例如"
188186

189187
#: ../../tutorial/datastructures.rst:197
190188
msgid "List Comprehensions"
@@ -197,18 +195,18 @@ msgid ""
197195
"operations applied to each member of another sequence or iterable, or to "
198196
"create a subsequence of those elements that satisfy a certain condition."
199197
msgstr ""
200-
"列表推导式提供了一个更简单的创建列表的方法。常见的用法是把某种操作应用于序列或可迭代对象的每个元素上,然后使用其结果来创建列表,或者通过满足某些特定条件元素来创建子序列。"
198+
"列表推导式创建列表的方式更简洁。常见的用法为,对序列或可迭代对象中的每个元素应用某种操作,用生成的结果创建新的列表;或用满足特定条件的元素创建子序列。"
201199

202200
#: ../../tutorial/datastructures.rst:204
203201
msgid "For example, assume we want to create a list of squares, like::"
204-
msgstr "例如,假设我们想创建一个平方列表,像这样 ::"
202+
msgstr "例如,创建平方值的列表:"
205203

206204
#: ../../tutorial/datastructures.rst:213
207205
msgid ""
208206
"Note that this creates (or overwrites) a variable named ``x`` that still "
209207
"exists after the loop completes. We can calculate the list of squares "
210208
"without any side effects using::"
211-
msgstr "注意这里创建(或被重写)的名为 ``x`` 的变量在for循环后仍然存在。我们可以计算平方列表的值而不会产生任何副作用 ::"
209+
msgstr "注意,循环结束后,创建(或重写)的名为 ``x`` 的变量仍然存在。这样就能计算平方列表的值,而且还没有任何副作用:"
212210

213211
#: ../../tutorial/datastructures.rst:219
214212
msgid "or, equivalently::"

0 commit comments

Comments
 (0)