@@ -125,7 +125,7 @@ msgid ""
125125"window 6\n"
126126"defenestrate 12"
127127msgstr ""
128- ">>> # Measure some strings: \n"
128+ ">>> # 測量一些字串: \n"
129129">>> words = ['cat', 'window', 'defenestrate']\n"
130130">>> for w in words:\n"
131131"... print(w, len(w))\n"
@@ -162,7 +162,7 @@ msgstr ""
162162"# 建立一個範例集合\n"
163163"users = {'Hans': 'active', 'Éléonore': 'inactive', '景太郎': 'active'}\n"
164164"\n"
165- "# 策略:對副本進行迭代 \n"
165+ "# 策略:對副本進行疊代 \n"
166166"for user, status in users.copy().items():\n"
167167" if status == 'inactive':\n"
168168" del users[user]\n"
@@ -470,7 +470,7 @@ msgstr ""
470470"... print(n, 'equals', x, '*', n//x)\n"
471471"... break\n"
472472"... else:\n"
473- "... # loop fell through without finding a factor \n"
473+ "... # 迴圈結束但沒有找到因數 \n"
474474"... print(n, 'is a prime number')\n"
475475"...\n"
476476"2 is a prime number\n"
@@ -536,7 +536,7 @@ msgid ""
536536"..."
537537msgstr ""
538538">>> while True:\n"
539- "... pass # Busy-wait for keyboard interrupt (Ctrl+C)\n"
539+ "... pass # 忙碌等待鍵盤中斷 (Ctrl+C)\n"
540540"..."
541541
542542#: ../../tutorial/controlflow.rst:266
@@ -570,7 +570,7 @@ msgid ""
570570"..."
571571msgstr ""
572572">>> def initlog(*args):\n"
573- "... pass # Remember to implement this! \n"
573+ "... pass # 記得要實作這個! \n"
574574"..."
575575
576576#: ../../tutorial/controlflow.rst:284
@@ -667,7 +667,7 @@ msgid ""
667667" case _:\n"
668668" raise ValueError(\" Not a point\" )"
669669msgstr ""
670- "# point is an (x, y) tuple \n"
670+ "# point 是一個 (x, y) 元組 \n"
671671"match point:\n"
672672" case (0, 0):\n"
673673" print(\" Origin\" )\n"
@@ -987,15 +987,15 @@ msgid ""
987987">>> fib(2000)\n"
988988"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597"
989989msgstr ""
990- ">>> def fib(n): # write Fibonacci series less than n \n"
991- "... \"\"\" Print a Fibonacci series less than n. \"\"\" \n"
990+ ">>> def fib(n): # 寫出小於 n 的費氏數列 \n"
991+ "... \"\"\" 印出小於 n 的費氏數列。 \"\"\" \n"
992992"... a, b = 0, 1\n"
993993"... while a < n:\n"
994994"... print(a, end=' ')\n"
995995"... a, b = b, a+b\n"
996996"... print()\n"
997997"...\n"
998- ">>> # Now call the function we just defined: \n"
998+ ">>> # 現在呼叫我們剛才定義的函式: \n"
999999">>> fib(2000)\n"
10001000"0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597"
10011001
@@ -1131,17 +1131,17 @@ msgid ""
11311131">>> f100 # write the result\n"
11321132"[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]"
11331133msgstr ""
1134- ">>> def fib2(n): # return Fibonacci series up to n \n"
1135- "... \"\"\" Return a list containing the Fibonacci series up to n. \"\"\" \n"
1134+ ">>> def fib2(n): # 回傳到 n 為止的費氏數列 \n"
1135+ "... \"\"\" 回傳包含到 n 為止的費氏數列的列表。 \"\"\" \n"
11361136"... result = []\n"
11371137"... a, b = 0, 1\n"
11381138"... while a < n:\n"
1139- "... result.append(a) # see below \n"
1139+ "... result.append(a) # 見下方 \n"
11401140"... a, b = b, a+b\n"
11411141"... return result\n"
11421142"...\n"
1143- ">>> f100 = fib2(100) # call it \n"
1144- ">>> f100 # write the result \n"
1143+ ">>> f100 = fib2(100) # 呼叫它 \n"
1144+ ">>> f100 # 寫出結果 \n"
11451145"[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]"
11461146
11471147#: ../../tutorial/controlflow.rst:550
@@ -1401,9 +1401,9 @@ msgid ""
14011401msgstr ""
14021402"parrot(1000) # 1 positional "
14031403"argument\n"
1404- "parrot(voltage=1000) # 1 keyword argument \n"
1405- "parrot(voltage=1000000, action='VOOOOOM') # 2 keyword arguments \n"
1406- "parrot(action='VOOOOOM', voltage=1000000) # 2 keyword arguments \n"
1404+ "parrot(voltage=1000) # 1 個關鍵字引數 \n"
1405+ "parrot(voltage=1000000, action='VOOOOOM') # 2 個關鍵字引數 \n"
1406+ "parrot(action='VOOOOOM', voltage=1000000) # 2 個關鍵字引數 \n"
14071407"parrot('a million', 'bereft of life', 'jump') # 3 positional "
14081408"arguments\n"
14091409"parrot('a thousand', state='pushing up the daisies') # 1 positional, 1 "
@@ -1421,11 +1421,11 @@ msgid ""
14211421"parrot(110, voltage=220) # duplicate value for the same argument\n"
14221422"parrot(actor='John Cleese') # unknown keyword argument"
14231423msgstr ""
1424- "parrot() # required argument missing \n"
1424+ "parrot() # 缺少必要引數 \n"
14251425"parrot(voltage=5.0, 'dead') # non-keyword argument after a keyword "
14261426"argument\n"
1427- "parrot(110, voltage=220) # duplicate value for the same argument \n"
1428- "parrot(actor='John Cleese') # unknown keyword argument "
1427+ "parrot(110, voltage=220) # 同一個引數有重複值 \n"
1428+ "parrot(actor='John Cleese') # 未知的關鍵字引數 "
14291429
14301430#: ../../tutorial/controlflow.rst:684
14311431msgid ""
@@ -1989,7 +1989,7 @@ msgid ""
19891989"list\n"
19901990"[3, 4, 5]"
19911991msgstr ""
1992- ">>> list(range(3, 6)) # normal call with separate arguments \n"
1992+ ">>> list(range(3, 6)) # 使用分離引數的一般呼叫 \n"
19931993"[3, 4, 5]\n"
19941994">>> args = [3, 6]\n"
19951995">>> list(range(*args)) # call with arguments unpacked from a "
@@ -2160,9 +2160,9 @@ msgid ""
21602160"No, really, it doesn't do anything."
21612161msgstr ""
21622162">>> def my_function():\n"
2163- "... \"\"\" Do nothing, but document it. \n"
2163+ "... \"\"\" 不做任何事,但有文件說明。 \n"
21642164"...\n"
2165- "... No, really, it doesn't do anything. \n"
2165+ "... 不,真的,它什麼都不做。 \n"
21662166"... \"\"\" \n"
21672167"... pass\n"
21682168"...\n"
0 commit comments