@@ -214,24 +214,27 @@ msgid ""
214214"In a :keyword:`for` loop, the :keyword:`!else` clause is executed after the "
215215"loop reaches its final iteration."
216216msgstr ""
217+ "在 :keyword:`for` 迴圈中,:keyword:`!else` 子句會在迴圈到達最終的疊代後執行。"
217218
218219#: ../../tutorial/controlflow.rst:174
219220msgid ""
220221"In a :keyword:`while` loop, it's executed after the loop's condition becomes "
221222"false."
222- msgstr ""
223+ msgstr "在 :keyword:`while` 迴圈中,它會在迴圈條件變為 false 後執行。 "
223224
224225#: ../../tutorial/controlflow.rst:176
225226msgid ""
226227"In either kind of loop, the :keyword:`!else` clause is **not** executed if "
227228"the loop was terminated by a :keyword:`break`."
228229msgstr ""
230+ "在任何一種迴圈中,如果迴圈由 :keyword:`break` 終止,則不會執行 :keyword:`!"
231+ "else` 子句。"
229232
230233#: ../../tutorial/controlflow.rst:179
231234msgid ""
232235"This is exemplified in the following :keyword:`!for` loop, which searches "
233236"for prime numbers::"
234- msgstr ""
237+ msgstr "下面的 :keyword:`!for` 迴圈對此進行了舉例說明,該迴圈用以搜索質數: :: "
235238
236239#: ../../tutorial/controlflow.rst:200
237240msgid ""
@@ -254,7 +257,7 @@ msgstr ""
254257"keyword:`try` 陳述式中的 ``else`` 子句更為相似::keyword:`try` 陳述式的 "
255258"``else`` 子句在沒有發生例外 (exception) 時執行,而迴圈的 ``else`` 子句在沒有"
256259"任何 ``break`` 發生時執行。更多有關 :keyword:`!try` 陳述式和例外的介紹,見"
257- "\\ :ref:`tut-handling`\\ 。"
260+ "\\ :ref:`tut-handling`。"
258261
259262#: ../../tutorial/controlflow.rst:210
260263msgid ""
@@ -294,7 +297,7 @@ msgid ""
294297"ignored::"
295298msgstr ""
296299":keyword:`pass` 亦可作為一個函式或條件判斷主體的預留位置,在你撰寫新的程式碼"
297- "時讓你保持在更抽象的思維層次。\\ :keyword:`!pass` 會直接被忽略:\n"
300+ "時讓你保持在更抽象的思維層次。:keyword:`!pass` 會直接被忽略:\n"
298301"\n"
299302"::"
300303
@@ -363,8 +366,8 @@ msgid ""
363366msgstr ""
364367"請仔細研究那個例子!第一個模式有兩個字面值,可以想作是之前所述的字面值模式的"
365368"延伸。但是接下來的兩個模式結合了一個字面值和一個變數,且該變數\\ *繫結 "
366- "(bind)*\\ 了來自主題 (``point``) 的一個值。第四個模式會擷取兩個值,這使得它在 "
367- "概念上類似於拆解賦值 ``(x, y) = point``。"
369+ "(bind)* 了來自主題 (``point``) 的一個值。第四個模式會擷取兩個值,這使得它在概 "
370+ "念上類似於拆解賦值 ``(x, y) = point``。"
368371
369372#: ../../tutorial/controlflow.rst:312
370373msgid ""
@@ -451,10 +454,10 @@ msgid ""
451454"also be ``_``, so ``(x, y, *_)`` matches a sequence of at least two items "
452455"without binding the remaining items."
453456msgstr ""
454- "序列模式 (sequence pattern) 可支援擴充拆解 (extended unpacking):\\ ``[x, y, "
455- "*rest]`` 與 ``(x, y, *rest)`` 的作用類似於拆解賦值。\\ ``*`` 後面的名稱也可以 "
456- "是 ``_``,所以 ``(x, y, *_)`` 會匹配一個至少兩項的序列,且不會連結那兩項以外 "
457- "的其餘項 。"
457+ "序列模式 (sequence pattern) 可支援擴充拆解 (extended unpacking):``[x, y, "
458+ "*rest]`` 與 ``(x, y, *rest)`` 的作用類似於拆解賦值。``*`` 後面的名稱也可以是 "
459+ "``_``,所以 ``(x, y, *_)`` 會匹配一個至少兩項的序列,且不會連結那兩項以外的其 "
460+ "餘項 。"
458461
459462#: ../../tutorial/controlflow.rst:394
460463msgid ""
@@ -463,10 +466,10 @@ msgid ""
463466"sequence patterns, extra keys are ignored. An unpacking like ``**rest`` is "
464467"also supported. (But ``**_`` would be redundant, so it is not allowed.)"
465468msgstr ""
466- "映射模式 (mapping pattern):\\ ``{\" bandwidth\" : b, \" latency\" : l}`` 能從一 "
467- "個 dictionary(字典)中擷取 ``\" bandwidth\" `` 及 ``\" latency\" `` 的值。與序列 "
468- "模式不同 ,額外的鍵 (key) 會被忽略。一種像是 ``**rest`` 的拆解方式,也是可被支 "
469- "援的 。(但 ``**_`` 則是多餘的做法,所以它並不被允許。)"
469+ "映射模式 (mapping pattern):``{\" bandwidth\" : b, \" latency\" : l}`` 能從一個 "
470+ "dictionary(字典)中擷取 ``\" bandwidth\" `` 及 ``\" latency\" `` 的值。與序列模 "
471+ "式不同 ,額外的鍵 (key) 會被忽略。一種像是 ``**rest`` 的拆解方式,也是可被支援 "
472+ "的 。(但 ``**_`` 則是多餘的做法,所以它並不被允許。)"
470473
471474#: ../../tutorial/controlflow.rst:399
472475msgid "Subpatterns may be captured using the ``as`` keyword::"
@@ -489,7 +492,7 @@ msgid ""
489492"``False`` and ``None`` are compared by identity."
490493msgstr ""
491494"大部分的字面值是藉由相等性 (equality) 來比較,但是單例物件 (singleton) "
492- "``True``\\ 、 \\ ``False`` 和 ``None`` 是藉由標識值 (identity) 來比較。"
495+ "``True``、 ``False`` 和 ``None`` 是藉由標識值 (identity) 來比較。"
493496
494497#: ../../tutorial/controlflow.rst:409
495498msgid ""
@@ -542,7 +545,7 @@ msgid ""
542545"write, so make a habit of it."
543546msgstr ""
544547"一個函式的第一個陳述式可以是一個字串文本;該字串文本被視為該函式的說明文件字"
545- "串,即 :dfn:`docstring`\\ 。(關於 docstring 的細節請參見\\ :ref:`tut-"
548+ "串,即 :dfn:`docstring`。(關於 docstring 的細節請參見\\ :ref:`tut-"
546549"docstrings`\\ 段落。)有些工具可以使用 docstring 來自動產生線上或可列印的文"
547550"件,或讓使用者能以互動的方式在原始碼中瀏覽文件。在原始碼中加入 docstring 是個"
548551"好慣例,應該養成這樣的習慣。"
@@ -633,8 +636,8 @@ msgid ""
633636"off the end of a function also returns ``None``."
634637msgstr ""
635638":keyword:`return` 陳述式會讓一個函式回傳一個值。單獨使用 :keyword:`!return` "
636- "不外加一個運算式作為引數時會回傳 ``None``\\ 。一個函式執行到結束也會回傳 "
637- "``None``\\ 。"
639+ "不外加一個運算式作為引數時會回傳 ``None``。一個函式執行到結束也會回傳 "
640+ "``None``。"
638641
639642#: ../../tutorial/controlflow.rst:530
640643msgid ""
@@ -651,7 +654,7 @@ msgid ""
651654"efficient."
652655msgstr ""
653656"``result.append(a)`` 陳述式呼叫了一個 list 物件 ``result`` 的 *method(方法)"
654- "*\\ 。method 為「屬於」一個物件的函式,命名規則為 ``obj.methodname``,其中 "
657+ "*。method 為「屬於」一個物件的函式,命名規則為 ``obj.methodname``,其中 "
655658"``obj`` 為某個物件(亦可為一運算式),而 ``methodname`` 為該 method 的名稱,"
656659"並由該物件的型別所定義。不同的型別定義不同的 method。不同型別的 method 可以擁"
657660"有一樣的名稱而不會讓 Python 混淆。(你可以使用 *class*\\ (類別)定義自己的物"
@@ -692,21 +695,21 @@ msgstr "該函式可以用以下幾種方式被呼叫:"
692695#: ../../tutorial/controlflow.rst:574
693696msgid ""
694697"giving only the mandatory argument: ``ask_ok('Do you really want to quit?')``"
695- msgstr "只給必要引數:\\ ``ask_ok('Do you really want to quit?')``"
698+ msgstr "只給必要引數:``ask_ok('Do you really want to quit?')``"
696699
697700#: ../../tutorial/controlflow.rst:576
698701msgid ""
699702"giving one of the optional arguments: ``ask_ok('OK to overwrite the file?', "
700703"2)``"
701- msgstr "給予一個選擇性引數:\\ ``ask_ok('OK to overwrite the file?', 2)``"
704+ msgstr "給予一個選擇性引數:``ask_ok('OK to overwrite the file?', 2)``"
702705
703706#: ../../tutorial/controlflow.rst:578
704707msgid ""
705708"or even giving all arguments: ``ask_ok('OK to overwrite the file?', 2, 'Come "
706709"on, only yes or no!')``"
707710msgstr ""
708- "給予所有引數:\\ ``ask_ok('OK to overwrite the file?', 2, 'Come on, only yes "
709- "or no!')``"
711+ "給予所有引數:``ask_ok('OK to overwrite the file?', 2, 'Come on, only yes or "
712+ "no!')``"
710713
711714#: ../../tutorial/controlflow.rst:581
712715msgid ""
@@ -989,8 +992,8 @@ msgid ""
989992"There is no possible call that will make it return ``True`` as the keyword "
990993"``'name'`` will always bind to the first parameter. For example::"
991994msgstr ""
992- "呼叫該函式不可能回傳 ``True``\\ ,因為關鍵字 ``'name'`` 永遠是連結在第一個參 "
993- "數。 例如:\n"
995+ "呼叫該函式不可能回傳 ``True``,因為關鍵字 ``'name'`` 永遠是連結在第一個參數。 "
996+ "例如:\n"
994997"\n"
995998"::"
996999
@@ -1313,8 +1316,8 @@ msgid ""
13131316"Use spaces around operators and after commas, but not directly inside "
13141317"bracketing constructs: ``a = f(1, 2) + g(3, 4)``."
13151318msgstr ""
1316- "運算子前後、逗號後要加空格,但不要直接放在括號內側:\\ ``a = f(1, 2) + g(3, "
1317- "4)``\\ 。"
1319+ "運算子前後、逗號後要加空格,但不要直接放在括號內側:``a = f(1, 2) + g(3, "
1320+ "4)``。"
13181321
13191322#: ../../tutorial/controlflow.rst:1108
13201323msgid ""
0 commit comments