@@ -361,13 +361,14 @@ msgid ""
361
361
"*format_spec* string is interpreted. This allows the formatting of a value "
362
362
"to be dynamically specified."
363
363
msgstr ""
364
- "*format_spec* 欄位還可以在其內部包含巢狀的替換欄位。這些巢狀的替換欄位包含欄"
365
- "位位名稱、轉換旗標、格式規格描述,但是不允許再更深層的巢狀。format_spec 内部"
366
- "的替換欄位會在解讀 *format_spec* 字串之前先被直譯。這允許動態地指定值的格式。"
364
+ "*format_spec* 欄位還可以在其內部包含巢狀的替換欄位。這些巢狀的替換欄位可能包"
365
+ "含欄位名稱、轉換旗標、格式規格描述,但是不允許再更深層的巢狀結構。"
366
+ "format_spec 内部的替換欄位會在 *format_spec* 字串被直譯前被替換。這讓數值的格"
367
+ "式能夠被動態地指定。"
367
368
368
369
#: ../../library/string.rst:290
369
370
msgid "See the :ref:`formatexamples` section for some examples."
370
- msgstr "範例請見 :ref:`formatexamples`\\ 。"
371
+ msgstr "範例請見 :ref:`formatexamples`。"
371
372
372
373
#: ../../library/string.rst:296
373
374
msgid "Format Specification Mini-Language"
@@ -382,9 +383,9 @@ msgid ""
382
383
"how the format specification is to be interpreted."
383
384
msgstr ""
384
385
"「格式規格」在格式字串 (format string) 中包含的替換欄位中使用,以定義各個值如"
385
- "何被呈現(請參考 :ref:`formatstrings`and :ref:`f-strings` )。它們也能夠直接 "
386
- "傳遞給內建的 :func:`format` 函式。每個可格式化型別 (formattable type)可以定 "
387
- "義格式規格如何被直譯 。"
386
+ "何被呈現(請參考 :ref:`formatstrings`和 :ref:`f-strings`\\ )。它們也能夠直 "
387
+ "接傳遞給內建的 :func:`format` 函式。每個可格式化型別 (formattable type)可以 "
388
+ "定義格式規格如何被直譯 。"
388
389
389
390
#: ../../library/string.rst:305
390
391
msgid ""
@@ -400,8 +401,8 @@ msgid ""
400
401
"result as if you had called :func:`str` on the value. A non-empty format "
401
402
"specification typically modifies the result."
402
403
msgstr ""
403
- "一般來說,輸入空格式規格會產生和呼叫 :func:`str` 函式相同的結果,非空的格式規 "
404
- "格才會修改結果 。"
404
+ "一般來說,輸入空格式規格會產生和對值呼叫 :func:`str` 函式相同的結果,非空的格 "
405
+ "式規格才會修改結果 。"
405
406
406
407
#: ../../library/string.rst:312
407
408
msgid "The general form of a *standard format specifier* is:"
@@ -420,7 +421,7 @@ msgstr ""
420
421
"如果給定了一個有效的 *align* 值,則可以在它之前加一個 *fill* 字元,且該字元可"
421
422
"為任意字元,若不加的話預設為空格。使用\\ :ref:`格式字串 <f-strings>`\\ 或 :"
422
423
"meth:`str.format` 時是無法在其中使用大括號(\" ``{``\" 或\" ``}``\" )作為 "
423
- "*fill* 字元的,但仍可透過巢狀替換的方式插入大括號 。此限制不影響 :func:"
424
+ "*fill* 字元的,但仍可透過巢狀替換欄位的方式插入大括號 。此限制不影響 :func:"
424
425
"`format` 函式。"
425
426
426
427
#: ../../library/string.rst:333
@@ -589,9 +590,9 @@ msgid ""
589
590
"is equivalent to a *fill* character of ``'0'`` with an *alignment* type of "
590
591
"``'='``."
591
592
msgstr ""
592
- "當未給予明確的對齊指示,在 *width*欄位前面將填入零 (``'0'``)字元將會為數值 "
593
- "型別啟用有符號察覺的零填充 (sign-aware zero-padding)。這相當於同時使用 "
594
- "``'0'`` 為 *fill*字元與對齊類型 ``'='``"
593
+ "當未給予明確的對齊指示,在 *width*欄位前面填入零 (``'0'``)字元將會為數值型 "
594
+ "別啟用有符號察覺的零填充 (sign-aware zero-padding)。這相當於使用 ``'0'`` 為 "
595
+ "*fill*字元且對齊類型為 ``'='``。 "
595
596
596
597
#: ../../library/string.rst:439
597
598
msgid ""
@@ -929,7 +930,7 @@ msgstr "替換 ``%+f``、``%-f`` 和 ``% f`` 以及指定正負號: ::"
929
930
#: ../../library/string.rst:674
930
931
msgid ""
931
932
"Replacing ``%x`` and ``%o`` and converting the value to different bases::"
932
- msgstr "替換 ``%x``或 ``%o``用來根據不同的進位制轉換其值 : ::"
933
+ msgstr "替換 ``%x``和 ``%o``並將其值轉換為不同的進位制 : ::"
933
934
934
935
#: ../../library/string.rst:683
935
936
msgid "Using the comma as a thousands separator::"
@@ -1042,25 +1043,25 @@ msgid ""
1042
1043
"dangling delimiters, unmatched braces, or placeholders that are not valid "
1043
1044
"Python identifiers."
1044
1045
msgstr ""
1045
- "雖然仍可能發生其他例外,但這個方法被稱為 「安全」,因為它總是試圖回傳一個有用 "
1046
- "的字串而不是引發例外 。從另一個角度來看,:meth:`safe_substitute`可能並非完全 "
1047
- "安全 ,因為它會默默忽略格式錯誤的模板,這些模板包含了未成對的括號、不匹配的括 "
1048
- "號 ,或者不是有效的 Python識別符的佔位符號 。"
1046
+ "雖然仍可能發生其他例外,但這個方法被認為是 「安全」的,因為它總是試圖回傳一個 "
1047
+ "有用的字串而不是引發例外 。從另一個角度來看,:meth:`safe_substitute`可能並非 "
1048
+ "完全安全 ,因為它會默默忽略格式錯誤的模板,這些模板包含了多餘的左右定界符、不 "
1049
+ "匹配的括號 ,或者不是有效的 Python識別字的佔位符號 。"
1049
1050
1050
1051
#: ../../library/string.rst:802
1051
1052
msgid ""
1052
1053
"Returns false if the template has invalid placeholders that will cause :meth:"
1053
1054
"`substitute` to raise :exc:`ValueError`."
1054
1055
msgstr ""
1055
- "如果模板有無效的佔位符號,將導致 :meth:`substitute` 引發 :exc:`ValueError`, "
1056
- "並回傳 false。"
1056
+ "如果模板有將導致 :meth:`substitute` 引發 :exc:`ValueError` 的無效佔位符號,就 "
1057
+ "會回傳 false。"
1057
1058
1058
1059
#: ../../library/string.rst:810
1059
1060
msgid ""
1060
1061
"Returns a list of the valid identifiers in the template, in the order they "
1061
1062
"first appear, ignoring any invalid identifiers."
1062
1063
msgstr ""
1063
- "回傳模板中有效識別符的 list ,按照它們首次出現的順序,忽略任何無效的識別符 。"
1064
+ "回傳模板中有效識別字的串列 ,按照它們首次出現的順序,並忽略任何無效的識別字 。"
1064
1065
1065
1066
#: ../../library/string.rst:815
1066
1067
msgid ":class:`Template` instances also provide one public data attribute:"
@@ -1071,8 +1072,8 @@ msgid ""
1071
1072
"This is the object passed to the constructor's *template* argument. In "
1072
1073
"general, you shouldn't change it, but read-only access is not enforced."
1073
1074
msgstr ""
1074
- "這是傳遞給建構子 *template* 引數的物件。一般來說,你不應該改變它,但並沒有強 "
1075
- "制設定成唯讀 。"
1075
+ "這是傳遞給建構函式 *template* 引數的物件。一般來說,你不應該改變它,但並沒有 "
1076
+ "強制設定成唯讀 。"
1076
1077
1077
1078
#: ../../library/string.rst:822
1078
1079
msgid "Here is an example of how to use a Template::"
@@ -1085,7 +1086,7 @@ msgid ""
1085
1086
"expression used to parse template strings. To do this, you can override "
1086
1087
"these class attributes:"
1087
1088
msgstr ""
1088
- "進階用法:你可以繼承 :class:`Template` 類別來自定義佔位符號語法、分隔符號字 "
1089
+ "進階用法:你可以衍生 :class:`Template` 類別來自定義佔位符號語法、左右定界符字 "
1089
1090
"元,或者用於剖析模板字串的正則表達式。你可以透過覆寫這些類別屬性來達成:"
1090
1091
1091
1092
#: ../../library/string.rst:845
@@ -1097,9 +1098,10 @@ msgid ""
1097
1098
"delimiter after class creation (i.e. a different delimiter must be set in "
1098
1099
"the subclass's class namespace)."
1099
1100
msgstr ""
1100
- "*delimiter* -- 這是描述引入分隔符號的文字字串。預設值是 ``$``。請注意這\\ *不"
1101
- "是*\\ 正規表示式,實作會根據字串值呼叫 :meth:`re.escape` 方法。也請注意你不能"
1102
- "在建立類別後修改分隔符號。(意即在子類別的命名空間中必須設置不同的分隔符號)"
1101
+ "*delimiter* -- 這是描述引入左右定界符的文字字串。預設值是 ``$``。請注意這\\ *"
1102
+ "不是*\\ 正規表示式,因為實作會在需要時對這個字串呼叫 :meth:`re.escape`。也請"
1103
+ "注意你不能在建立類別後修改左右定界符。(意即在子類別的命名空間中必須設置不同"
1104
+ "的左右定界符)"
1103
1105
1104
1106
#: ../../library/string.rst:852
1105
1107
msgid ""
@@ -1159,31 +1161,31 @@ msgid ""
1159
1161
"*named* -- This group matches the unbraced placeholder name; it should not "
1160
1162
"include the delimiter in capturing group."
1161
1163
msgstr ""
1162
- "*named* -- 此群組與不帶大括號的佔位符號名稱匹配;它不應包含擷取群組中的分隔符 "
1163
- "號 。"
1164
+ "*named* -- 此群組與不帶大括號的佔位符號名稱匹配;它不應包含擷取群組中的左右定 "
1165
+ "界符號 。"
1164
1166
1165
1167
#: ../../library/string.rst:895
1166
1168
msgid ""
1167
1169
"*braced* -- This group matches the brace enclosed placeholder name; it "
1168
1170
"should not include either the delimiter or braces in the capturing group."
1169
1171
msgstr ""
1170
- "*braced* -- 此群組與大括號括起來的佔位符號名稱匹配;它不應在擷取群組中包含分 "
1171
- "隔符號或大括號 。"
1172
+ "*braced* -- 此群組與大括號括起來的佔位符號名稱匹配;它不應在擷取群組中包含左 "
1173
+ "右定界符或大括號 。"
1172
1174
1173
1175
#: ../../library/string.rst:898
1174
1176
msgid ""
1175
1177
"*invalid* -- This group matches any other delimiter pattern (usually a "
1176
1178
"single delimiter), and it should appear last in the regular expression."
1177
1179
msgstr ""
1178
- "*invalid* --此群組與任何其他分隔符號模式(通常是單一分隔符號 )匹配,且它應該 "
1179
- "出現在正規表示式的最後 。"
1180
+ "*invalid* --此群組與任何其他左右定界符模式(通常是單一左右定界符 )匹配,且它 "
1181
+ "應該出現在正規表示式的最後 。"
1180
1182
1181
1183
#: ../../library/string.rst:901
1182
1184
msgid ""
1183
1185
"The methods on this class will raise :exc:`ValueError` if the pattern "
1184
1186
"matches the template without one of these named groups matching."
1185
1187
msgstr ""
1186
- "當格式符合模板卻沒有符合這些命名組之一 ,此類別的方法將引發 :exc:"
1188
+ "當此模式有匹配於模板但這些命名組中卻有任一個不匹配 ,此類別的方法將引發 :exc:"
1187
1189
"`ValueError`。"
1188
1190
1189
1191
#: ../../library/string.rst:906