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 @@ -421,27 +421,38 @@ msgstr ""
421
421
422
422
#: ../../faq/design.rst:233
423
423
msgid "How fast are exceptions?"
424
- msgstr ""
424
+ msgstr "例外處理有多快? "
425
425
426
426
#: ../../faq/design.rst:235
427
427
msgid ""
428
428
"A try/except block is extremely efficient if no exceptions are raised. "
429
429
"Actually catching an exception is expensive. In versions of Python prior to "
430
430
"2.0 it was common to use this idiom::"
431
431
msgstr ""
432
+ "如果沒有例外被丟出,一個 try/except 區塊是非常有效率的。事實上,抓捕例外要付"
433
+ "出昂貴的代價。在 Python 2.0 以前,這樣使用是相當常見的:\n"
434
+ "\n"
435
+ "::"
432
436
433
437
#: ../../faq/design.rst:245
434
438
msgid ""
435
439
"This only made sense when you expected the dict to have the key almost all "
436
440
"the time. If that wasn't the case, you coded it like this::"
437
441
msgstr ""
442
+ "這只有在你預料這個字典大多數時候都有鍵的時候才合理。如果並非如此,你應該寫"
443
+ "成:\n"
444
+ "\n"
445
+ "::"
438
446
439
447
#: ../../faq/design.rst:253
440
448
msgid ""
441
449
"For this specific case, you could also use ``value = dict.setdefault(key, "
442
450
"getvalue(key))``, but only if the ``getvalue()`` call is cheap enough "
443
451
"because it is evaluated in all cases."
444
452
msgstr ""
453
+ "單就這個情況來說,你也可以用 ``value = dict.setdefault(key, "
454
+ "getvalue(key))``,不過只有在 ``getvalue()`` 代價不大的時候才能用,畢竟他每次"
455
+ "都會被執行。"
445
456
446
457
#: ../../faq/design.rst:259
447
458
msgid "Why isn't there a switch or case statement in Python?"
You can’t perform that action at this time.
0 commit comments