Skip to content

Commit 769b665

Browse files
committed
Translate faq/design.html#why-is-there-no-goto
1 parent 44ae53a commit 769b665

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

faq/design.po

+12-2
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ msgstr ""
10471047

10481048
#: ../../faq/design.rst:597
10491049
msgid "Why is there no goto?"
1050-
msgstr "為何沒有goto語法?"
1050+
msgstr "為何沒有 goto 語法?"
10511051

10521052
#: ../../faq/design.rst:599
10531053
msgid ""
@@ -1058,6 +1058,11 @@ msgid ""
10581058
"expressions) and loop (with ``while`` and ``for`` statements, possibly "
10591059
"containing ``continue`` and ``break``)."
10601060
msgstr ""
1061+
"在 1970 年代,人們了解到沒有限制的 goto 會導致混亂、難以理解和修改的「義大利"
1062+
"麵」程式碼 (\"spaghetti\" code)。在高階語言裡,這也是不需要的,因為有方法可以"
1063+
"做邏輯分支(以 python 來說,用 ``if`` 陳述句和 ``or``、``and`` 及 ``if-"
1064+
"else`` 表示式)和迴圈(用 ``while`` 和 ``for`` 陳述句,可能會有 ``continue`` "
1065+
"和 ``break``)。"
10611066

10621067
#: ../../faq/design.rst:606
10631068
msgid ""
@@ -1066,12 +1071,17 @@ msgid ""
10661071
"all reasonable uses of the \"go\" or \"goto\" constructs of C, Fortran, and "
10671072
"other languages. For example::"
10681073
msgstr ""
1074+
"我們也可以用例外來做「結構化的 goto」,這甚至可以跨函數呼叫。很多人覺得例外可"
1075+
"以方便地模擬在 C、Fortran 和其他語言裡各種合理使用的「go」和「goto」。例"
1076+
"如:\n"
1077+
"\n"
1078+
"::"
10691079

10701080
#: ../../faq/design.rst:622
10711081
msgid ""
10721082
"This doesn't allow you to jump into the middle of a loop, but that's usually "
10731083
"considered an abuse of goto anyway. Use sparingly."
1074-
msgstr ""
1084+
msgstr "這依然不能讓你跳進迴圈內,這通常被認為是對 goto 的濫用。請小心使用。"
10751085

10761086
#: ../../faq/design.rst:627
10771087
msgid "Why can't raw strings (r-strings) end with a backslash?"

0 commit comments

Comments
 (0)