File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -303,10 +303,12 @@ msgid ""
303
303
"Why does Python use methods for some functionality (e.g. list.index()) but "
304
304
"functions for other (e.g. len(list))?"
305
305
msgstr ""
306
+ "為何 Python 對於一些功能實作使用方法(像是 list.index()),另一些使用函式(像"
307
+ "是 len(list))?"
306
308
307
309
#: ../../faq/design.rst:171
308
310
msgid "As Guido said:"
309
- msgstr ""
311
+ msgstr "如吉多所說: "
310
312
311
313
#: ../../faq/design.rst:173
312
314
msgid ""
@@ -316,6 +318,10 @@ msgid ""
316
318
"problem. Compare the easy with which we rewrite a formula like x*(a+b) into "
317
319
"x*a + x*b to the clumsiness of doing the same thing using a raw OO notation."
318
320
msgstr ""
321
+ "(一) 對一些運算來說,前綴寫法看起來會比後綴寫法好 ── 前綴(和中綴!)運算在"
322
+ "數學上有更久遠的傳統,這些符號在視覺上幫助數學家們更容易思考問題。想想把 x*(a"
323
+ "+b) 這種式子展開成 x*a+x*b 的簡單,再比較一下古老的圈圈符號記法的笨拙就知道"
324
+ "了。"
319
325
320
326
#: ../../faq/design.rst:180
321
327
msgid ""
@@ -328,6 +334,11 @@ msgid ""
328
334
"mapping has a get() or keys() method, or something that isn't a file has a "
329
335
"write() method."
330
336
msgstr ""
337
+ "(二) 當我看到一段程式碼寫著 len(x),我*知道*他要找某個東西的長度。這告訴了"
338
+ "我兩件事:結果是一個整數、參數是某種容器。相對地,當我看到 x.len(),我必須先"
339
+ "知道 x 是某種容器,並實作了一個介面或是繼承了一個有標準 len() 的類別。遇到一"
340
+ "個沒有實作映射 (mapping) 的類別卻有 get() 或 keys() 方法,或是不是檔案但卻有 "
341
+ "write() 方法時,我們偶爾會覺得困惑。"
331
342
332
343
#: ../../faq/design.rst:189
333
344
msgid "https://mail.python.org/pipermail/python-3000/2006-November/004643.html"
You can’t perform that action at this time.
0 commit comments