@@ -214,24 +214,27 @@ msgid ""
214
214
"In a :keyword:`for` loop, the :keyword:`!else` clause is executed after the "
215
215
"loop reaches its final iteration."
216
216
msgstr ""
217
+ "在 :keyword:`for` 迴圈中,:keyword:`!else` 子句會在迴圈到達最終的疊代後執行。"
217
218
218
219
#: ../../tutorial/controlflow.rst:174
219
220
msgid ""
220
221
"In a :keyword:`while` loop, it's executed after the loop's condition becomes "
221
222
"false."
222
- msgstr ""
223
+ msgstr "在 :keyword:`while` 迴圈中,它會在迴圈條件變為 false 後執行。 "
223
224
224
225
#: ../../tutorial/controlflow.rst:176
225
226
msgid ""
226
227
"In either kind of loop, the :keyword:`!else` clause is **not** executed if "
227
228
"the loop was terminated by a :keyword:`break`."
228
229
msgstr ""
230
+ "在任何一種迴圈中,如果迴圈由 :keyword:`break` 終止,則不會執行 :keyword:`!"
231
+ "else` 子句。"
229
232
230
233
#: ../../tutorial/controlflow.rst:179
231
234
msgid ""
232
235
"This is exemplified in the following :keyword:`!for` loop, which searches "
233
236
"for prime numbers::"
234
- msgstr ""
237
+ msgstr "下面的 :keyword:`!for` 迴圈對此進行了舉例說明,該迴圈用以搜索質數: :: "
235
238
236
239
#: ../../tutorial/controlflow.rst:200
237
240
msgid ""
@@ -254,7 +257,7 @@ msgstr ""
254
257
"keyword:`try` 陳述式中的 ``else`` 子句更為相似::keyword:`try` 陳述式的 "
255
258
"``else`` 子句在沒有發生例外 (exception) 時執行,而迴圈的 ``else`` 子句在沒有"
256
259
"任何 ``break`` 發生時執行。更多有關 :keyword:`!try` 陳述式和例外的介紹,見"
257
- "\\ :ref:`tut-handling`\\ 。"
260
+ "\\ :ref:`tut-handling`。"
258
261
259
262
#: ../../tutorial/controlflow.rst:210
260
263
msgid ""
@@ -294,7 +297,7 @@ msgid ""
294
297
"ignored::"
295
298
msgstr ""
296
299
":keyword:`pass` 亦可作為一個函式或條件判斷主體的預留位置,在你撰寫新的程式碼"
297
- "時讓你保持在更抽象的思維層次。\\ :keyword:`!pass` 會直接被忽略:\n"
300
+ "時讓你保持在更抽象的思維層次。:keyword:`!pass` 會直接被忽略:\n"
298
301
"\n"
299
302
"::"
300
303
@@ -363,8 +366,8 @@ msgid ""
363
366
msgstr ""
364
367
"請仔細研究那個例子!第一個模式有兩個字面值,可以想作是之前所述的字面值模式的"
365
368
"延伸。但是接下來的兩個模式結合了一個字面值和一個變數,且該變數\\ *繫結 "
366
- "(bind)*\\ 了來自主題 (``point``) 的一個值。第四個模式會擷取兩個值,這使得它在 "
367
- "概念上類似於拆解賦值 ``(x, y) = point``。"
369
+ "(bind)* 了來自主題 (``point``) 的一個值。第四個模式會擷取兩個值,這使得它在概 "
370
+ "念上類似於拆解賦值 ``(x, y) = point``。"
368
371
369
372
#: ../../tutorial/controlflow.rst:312
370
373
msgid ""
@@ -451,10 +454,10 @@ msgid ""
451
454
"also be ``_``, so ``(x, y, *_)`` matches a sequence of at least two items "
452
455
"without binding the remaining items."
453
456
msgstr ""
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
+ "餘項 。"
458
461
459
462
#: ../../tutorial/controlflow.rst:394
460
463
msgid ""
@@ -463,10 +466,10 @@ msgid ""
463
466
"sequence patterns, extra keys are ignored. An unpacking like ``**rest`` is "
464
467
"also supported. (But ``**_`` would be redundant, so it is not allowed.)"
465
468
msgstr ""
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
+ "的 。(但 ``**_`` 則是多餘的做法,所以它並不被允許。)"
470
473
471
474
#: ../../tutorial/controlflow.rst:399
472
475
msgid "Subpatterns may be captured using the ``as`` keyword::"
@@ -489,7 +492,7 @@ msgid ""
489
492
"``False`` and ``None`` are compared by identity."
490
493
msgstr ""
491
494
"大部分的字面值是藉由相等性 (equality) 來比較,但是單例物件 (singleton) "
492
- "``True``\\ 、 \\ ``False`` 和 ``None`` 是藉由標識值 (identity) 來比較。"
495
+ "``True``、 ``False`` 和 ``None`` 是藉由標識值 (identity) 來比較。"
493
496
494
497
#: ../../tutorial/controlflow.rst:409
495
498
msgid ""
@@ -542,7 +545,7 @@ msgid ""
542
545
"write, so make a habit of it."
543
546
msgstr ""
544
547
"一個函式的第一個陳述式可以是一個字串文本;該字串文本被視為該函式的說明文件字"
545
- "串,即 :dfn:`docstring`\\ 。(關於 docstring 的細節請參見\\ :ref:`tut-"
548
+ "串,即 :dfn:`docstring`。(關於 docstring 的細節請參見\\ :ref:`tut-"
546
549
"docstrings`\\ 段落。)有些工具可以使用 docstring 來自動產生線上或可列印的文"
547
550
"件,或讓使用者能以互動的方式在原始碼中瀏覽文件。在原始碼中加入 docstring 是個"
548
551
"好慣例,應該養成這樣的習慣。"
@@ -633,8 +636,8 @@ msgid ""
633
636
"off the end of a function also returns ``None``."
634
637
msgstr ""
635
638
":keyword:`return` 陳述式會讓一個函式回傳一個值。單獨使用 :keyword:`!return` "
636
- "不外加一個運算式作為引數時會回傳 ``None``\\ 。一個函式執行到結束也會回傳 "
637
- "``None``\\ 。"
639
+ "不外加一個運算式作為引數時會回傳 ``None``。一個函式執行到結束也會回傳 "
640
+ "``None``。"
638
641
639
642
#: ../../tutorial/controlflow.rst:530
640
643
msgid ""
@@ -651,7 +654,7 @@ msgid ""
651
654
"efficient."
652
655
msgstr ""
653
656
"``result.append(a)`` 陳述式呼叫了一個 list 物件 ``result`` 的 *method(方法)"
654
- "*\\ 。method 為「屬於」一個物件的函式,命名規則為 ``obj.methodname``,其中 "
657
+ "*。method 為「屬於」一個物件的函式,命名規則為 ``obj.methodname``,其中 "
655
658
"``obj`` 為某個物件(亦可為一運算式),而 ``methodname`` 為該 method 的名稱,"
656
659
"並由該物件的型別所定義。不同的型別定義不同的 method。不同型別的 method 可以擁"
657
660
"有一樣的名稱而不會讓 Python 混淆。(你可以使用 *class*\\ (類別)定義自己的物"
@@ -692,21 +695,21 @@ msgstr "該函式可以用以下幾種方式被呼叫:"
692
695
#: ../../tutorial/controlflow.rst:574
693
696
msgid ""
694
697
"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?')``"
696
699
697
700
#: ../../tutorial/controlflow.rst:576
698
701
msgid ""
699
702
"giving one of the optional arguments: ``ask_ok('OK to overwrite the file?', "
700
703
"2)``"
701
- msgstr "給予一個選擇性引數:\\ ``ask_ok('OK to overwrite the file?', 2)``"
704
+ msgstr "給予一個選擇性引數:``ask_ok('OK to overwrite the file?', 2)``"
702
705
703
706
#: ../../tutorial/controlflow.rst:578
704
707
msgid ""
705
708
"or even giving all arguments: ``ask_ok('OK to overwrite the file?', 2, 'Come "
706
709
"on, only yes or no!')``"
707
710
msgstr ""
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!')``"
710
713
711
714
#: ../../tutorial/controlflow.rst:581
712
715
msgid ""
@@ -989,8 +992,8 @@ msgid ""
989
992
"There is no possible call that will make it return ``True`` as the keyword "
990
993
"``'name'`` will always bind to the first parameter. For example::"
991
994
msgstr ""
992
- "呼叫該函式不可能回傳 ``True``\\ ,因為關鍵字 ``'name'`` 永遠是連結在第一個參 "
993
- "數。 例如:\n"
995
+ "呼叫該函式不可能回傳 ``True``,因為關鍵字 ``'name'`` 永遠是連結在第一個參數。 "
996
+ "例如:\n"
994
997
"\n"
995
998
"::"
996
999
@@ -1313,8 +1316,8 @@ msgid ""
1313
1316
"Use spaces around operators and after commas, but not directly inside "
1314
1317
"bracketing constructs: ``a = f(1, 2) + g(3, 4)``."
1315
1318
msgstr ""
1316
- "運算子前後、逗號後要加空格,但不要直接放在括號內側:\\ ``a = f(1, 2) + g(3, "
1317
- "4)``\\ 。"
1319
+ "運算子前後、逗號後要加空格,但不要直接放在括號內側:``a = f(1, 2) + g(3, "
1320
+ "4)``。"
1318
1321
1319
1322
#: ../../tutorial/controlflow.rst:1108
1320
1323
msgid ""
0 commit comments