File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -525,7 +525,7 @@ msgstr ""
525
525
526
526
#: ../../faq/design.rst:306
527
527
msgid "Why can't lambda expressions contain statements?"
528
- msgstr "為何lambda表示式不能包含在敘述內 "
528
+ msgstr "為何 lambda 運算式不能包含陳述式? "
529
529
530
530
#: ../../faq/design.rst:308
531
531
msgid ""
@@ -535,6 +535,10 @@ msgid ""
535
535
"other languages, where they add functionality, Python lambdas are only a "
536
536
"shorthand notation if you're too lazy to define a function."
537
537
msgstr ""
538
+ "Python 的 lambda 運算式不能包含陳述式是因為 Python 的語法框架無法處理包在運算"
539
+ "式中的陳述式。然而,在 Python 裡這並不是一個嚴重的問題。不像在其他語言中有獨"
540
+ "立功能的 lambda,Python 的 lambda 只是一個在你懶得定義函式時可用的一個簡寫表"
541
+ "達法。"
538
542
539
543
#: ../../faq/design.rst:314
540
544
msgid ""
@@ -545,6 +549,9 @@ msgid ""
545
549
"(which is exactly the same type of object that a lambda expression yields) "
546
550
"is assigned!"
547
551
msgstr ""
552
+ "函式已經是 Python 裡的一級物件 (first class objects),而且可以在區域範圍內被"
553
+ "宣告。因此唯一用 lambda 而非區域性的函式的優點就是你不需要多想一個函式名稱 — "
554
+ "但這樣就會是一個區域變數被指定成函數物件(和 lambda 運算式的結果同類)!"
548
555
549
556
#: ../../faq/design.rst:322
550
557
msgid "Can Python be compiled to machine code, C or some other language?"
You can’t perform that action at this time.
0 commit comments