@@ -347,7 +347,7 @@ msgstr ""
347
347
348
348
#: ../../faq/design.rst:193
349
349
msgid "Why is join() a string method instead of a list or tuple method?"
350
- msgstr ""
350
+ msgstr "為何 join() 是字串方法而非串列 (list) 或值組 (tuple) 方法? "
351
351
352
352
#: ../../faq/design.rst:195
353
353
msgid ""
@@ -357,14 +357,22 @@ msgid ""
357
357
"methods have been widely accepted, but the one which appears to make some "
358
358
"programmers feel uncomfortable is::"
359
359
msgstr ""
360
+ "自 Python 1.6 之後,字串變得很像其他標準的型別,也在此時,一些可以和字串模組"
361
+ "的函式有相同功能的方法也被加入。大多數的新方法都被廣泛接受,但有一個方法似乎"
362
+ "讓一些程式人員不舒服:\n"
363
+ "\n"
364
+ "::"
360
365
361
366
#: ../../faq/design.rst:203
362
367
msgid "which gives the result::"
363
368
msgstr ""
369
+ "結果是:\n"
370
+ "\n"
371
+ "::"
364
372
365
373
#: ../../faq/design.rst:207
366
374
msgid "There are two common arguments against this usage."
367
- msgstr ""
375
+ msgstr "通常有兩個反對這個用法的論點。 "
368
376
369
377
#: ../../faq/design.rst:209
370
378
msgid ""
@@ -374,6 +382,9 @@ msgid ""
374
382
"on names bound to strings there is no logical reason to make them "
375
383
"unavailable on literals."
376
384
msgstr ""
385
+ "第一項這麼說:「用字串文本(字串常數)看起來真的很醜」,也許真的如此,但字串"
386
+ "文本就只是一個固定值。如果方法可以用在值為字串的變數上,那沒道理字串文本不能"
387
+ "被使用。"
377
388
378
389
#: ../../faq/design.rst:215
379
390
msgid ""
@@ -382,12 +393,19 @@ msgid ""
382
393
"For some reason there seems to be much less difficulty with having :meth:"
383
394
"`~str.split` as a string method, since in that case it is easy to see that ::"
384
395
msgstr ""
396
+ "第二個反對意見通常是:「我是在叫一個序列把它的成員用一個字串常數連接起來」。"
397
+ "但很遺憾地,你並不是在這樣做。因為某種原因,把 :meth:`~str.split` 當成字串方"
398
+ "法比較簡單,因為這樣我們可以輕易地看到:\n"
399
+ "\n"
400
+ "::"
385
401
386
402
#: ../../faq/design.rst:222
387
403
msgid ""
388
404
"is an instruction to a string literal to return the substrings delimited by "
389
405
"the given separator (or, by default, arbitrary runs of white space)."
390
406
msgstr ""
407
+ "這是在叫一個字串文本回傳由指定的分隔符號(或是預設為空白)分出的子字串的指"
408
+ "令。"
391
409
392
410
#: ../../faq/design.rst:225
393
411
msgid ""
@@ -397,6 +415,9 @@ msgid ""
397
415
"obeys the rules for sequence objects, including any new classes you might "
398
416
"define yourself. Similar methods exist for bytes and bytearray objects."
399
417
msgstr ""
418
+ ":meth:`~str.join` 是一個字串方法,因為再用他的時候,你是告訴分隔字串去走遍整"
419
+ "個字串序列,並將自己插入到相鄰的兩項之間。這個方法的參數可以是任何符合序列規"
420
+ "則的物件,包括自定義的新類別。在 bytes 和 bytearray 物件也有類似的方法可用。"
400
421
401
422
#: ../../faq/design.rst:233
402
423
msgid "How fast are exceptions?"
0 commit comments