1515# cissoid <[email protected] >, 20231616# Freesand Leo <[email protected] >, 20231717# 乐成 王, 2023
18+ # LeeWendao <[email protected] >, 20231819#
1920#, fuzzy
2021msgid ""
@@ -23,7 +24,7 @@ msgstr ""
2324"Report-Msgid-Bugs-To : \n "
2425"POT-Creation-Date : 2023-08-11 14:13+0000\n "
2526"PO-Revision-Date : 2021-06-28 01:50+0000\n "
26- "Last-Translator : 乐成 王 , 2023\n "
27+ "
Last-Translator :
LeeWendao <[email protected] > , 2023\n"
2728"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2829"MIME-Version : 1.0\n "
2930"Content-Type : text/plain; charset=UTF-8\n "
@@ -196,8 +197,7 @@ msgstr "在 :keyword:`while` 循环中,它会在循环条件变为假值后执
196197msgid ""
197198"In either kind of loop, the :keyword:`!else` clause is **not** executed if "
198199"the loop was terminated by a :keyword:`break`."
199- msgstr ""
200- "在任意一种循环中,如果循环是因为 :keyword:`break` 而结束,则 :keyword:`!else` 子句 **不会** 执行。"
200+ msgstr "无论哪种循环,如果因为 :keyword:`break` 而结束,那么 :keyword:`!else` 子句就 **不会** 执行。"
201201
202202#: ../../tutorial/controlflow.rst:179
203203msgid ""
@@ -221,15 +221,15 @@ msgid ""
221221"``break`` occurs. For more on the :keyword:`!try` statement and exceptions, "
222222"see :ref:`tut-handling`."
223223msgstr ""
224- "与 :keyword:`if` 语句相比,循环的 ``else`` 子句更像 :keyword:`try` 的 ``else`` 子句: "
225- ":keyword:`try` 的 ``else`` 子句在未触发异常时执行 ,循环的 ``else`` 子句则在未运行 ``break`` "
226- "时执行。:keyword:`!try` 语句和异常详见 :ref:`tut-handling`。"
224+ "``else`` 子句用于循环时比起 :keyword:`if` 语句的 ``else`` 子句,更像 :keyword:`try` "
225+ "语句的。 :keyword:`try` 语句的 ``else`` 子句在未发生异常时执行 ,循环的 ``else`` 子句则在未发生 ``break`` "
226+ "时执行。 :keyword:`!try` 语句和异常详见 :ref:`tut-handling`。"
227227
228228#: ../../tutorial/controlflow.rst:210
229229msgid ""
230230"The :keyword:`continue` statement, also borrowed from C, continues with the "
231231"next iteration of the loop::"
232- msgstr ":keyword:`continue` 语句也借鉴自 C 语言,表示继续执行循环的下一次迭代 :"
232+ msgstr ":keyword:`continue` 语句,同样借鉴自 C 语言,以执行循环的下一次迭代来继续 :"
233233
234234#: ../../tutorial/controlflow.rst:231
235235msgid ":keyword:`!pass` Statements"
@@ -239,11 +239,11 @@ msgstr ":keyword:`!pass` 语句"
239239msgid ""
240240"The :keyword:`pass` statement does nothing. It can be used when a statement "
241241"is required syntactically but the program requires no action. For example::"
242- msgstr ":keyword:`pass` 语句不执行任何操作 。语法上需要一个语句,但程序不实际执行任何动作时 ,可以使用该语句。例如:"
242+ msgstr ":keyword:`pass` 语句不执行任何动作 。语法上需要一个语句,但程序毋需执行任何动作时 ,可以使用该语句。例如:"
243243
244244#: ../../tutorial/controlflow.rst:240
245245msgid "This is commonly used for creating minimal classes::"
246- msgstr "下面这段代码创建了一个最小的类 :"
246+ msgstr "这常用于创建一个最小的类 :"
247247
248248#: ../../tutorial/controlflow.rst:246
249249msgid ""
@@ -252,7 +252,7 @@ msgid ""
252252"to keep thinking at a more abstract level. The :keyword:`!pass` is silently"
253253" ignored::"
254254msgstr ""
255- ":keyword:`pass` 还可以用作函数或条件子句的占位符,让开发者聚焦更抽象的层次。此时,程序直接忽略 :keyword:`!pass`:"
255+ ":keyword:`pass` 还可用作函数或条件语句体的占位符,让你保持在更抽象的层次进行思考。 :keyword:`!pass` 会被默默地忽略 :"
256256
257257#: ../../tutorial/controlflow.rst:258
258258msgid ":keyword:`!match` Statements"
@@ -268,31 +268,31 @@ msgid ""
268268"also extract components (sequence elements or object attributes) from the "
269269"value into variables."
270270msgstr ""
271- ":keyword:`match` 语句接受一个表达式并把它的值与以一个或多个代码块形式给出的一系列模式进行比较。 这看上去类似于 C、Java 或 "
272- "JavaScript(以及许多其他编程语言 )中的 switch 语句,但其实它更类似于 Rust 或 Haskell 等编程语言中的模式匹配。 "
273- "只有第一个匹配的模式会被执行并且它还可以从值中提取组件 ( 序列的元素或对象的属性)并赋值给变量 。"
271+ ":keyword:`match` 语句接受一个表达式并把它的值与一个或多个 case 块给出的一系列模式进行比较。这表面上像 C、Java 或 "
272+ "JavaScript(以及许多其他程序设计语言 )中的 switch 语句,但其实它更像 Rust 或 Haskell "
273+ "中的模式匹配。只有第一个匹配的模式会被执行,并且它还可以提取值的组成部分( 序列的元素或对象的属性)赋给变量 。"
274274
275275#: ../../tutorial/controlflow.rst:268
276276msgid ""
277277"The simplest form compares a subject value against one or more literals::"
278- msgstr "最简单的形式是将一个目标值与一个或多个字面值进行比较 :"
278+ msgstr "最简单的形式是将一个主语值与一个或多个字面值进行比较 :"
279279
280280#: ../../tutorial/controlflow.rst:281
281281msgid ""
282282"Note the last block: the \" variable name\" ``_`` acts as a *wildcard* and "
283283"never fails to match. If no case matches, none of the branches is executed."
284- msgstr "注意最后一个代码块:“变量名” ``_`` 被作为 *通配符* 并必定会匹配成功。 如果没有 case 语句匹配成功 ,则不会执行任何分支。"
284+ msgstr "注意最后一个代码块:“变量名” ``_`` 被作为 *通配符* 并必定会匹配成功。如果没有 case 匹配成功 ,则不会执行任何分支。"
285285
286286#: ../../tutorial/controlflow.rst:284
287287msgid ""
288288"You can combine several literals in a single pattern using ``|`` (\" or\" )::"
289- msgstr "使用 ``|`` (“ or ”)在一个模式中可以组合多个字面值 :"
289+ msgstr "你可以用 ``|`` (“或”)将多个字面值组合到一个模式中 :"
290290
291291#: ../../tutorial/controlflow.rst:289
292292msgid ""
293293"Patterns can look like unpacking assignments, and can be used to bind "
294294"variables::"
295- msgstr "模式的形式类似解包赋值,并可被用于绑定变量 :"
295+ msgstr "形如解包赋值的模式,可用于绑定变量 :"
296296
297297#: ../../tutorial/controlflow.rst:305
298298msgid ""
@@ -303,15 +303,15 @@ msgid ""
303303" which makes it conceptually similar to the unpacking assignment ``(x, y) = "
304304"point``."
305305msgstr ""
306- "请仔细研究此代码! 第一个模式有两个字面值,可以看作是上面所示字面值模式的扩展 。但接下来的两个模式结合了一个字面值和一个变量,而变量 **绑定* * "
307- "了一个来自目标的值 (``point``)。第四个模式捕获了两个值,这使得它在概念上类似于解包赋值 ``(x, y) = point``。"
306+ "请仔细学习此代码! 第一个模式有两个字面值,可视为前述字面值模式的扩展 。但接下来的两个模式结合了一个字面值和一个变量,而变量 *绑定 * "
307+ "了来自主语 (``point``)的一个值 。第四个模式捕获了两个值,使它在概念上与解包赋值 ``(x, y) = point`` 类似 。"
308308
309309#: ../../tutorial/controlflow.rst:312
310310msgid ""
311311"If you are using classes to structure your data you can use the class name "
312312"followed by an argument list resembling a constructor, but with the ability "
313313"to capture attributes into variables::"
314- msgstr "如果使用类实现数据结构,可在类名后加一个类似于构造器的参数列表,这样做可以把属性放到变量里 :"
314+ msgstr "如果用类组织数据,可以用类名后接一个和构造器一致的参数列表,不过,它有把属性捕获到变量里的能力 :"
315315
316316#: ../../tutorial/controlflow.rst:334
317317msgid ""
0 commit comments