@@ -162,7 +162,7 @@ msgid ""
162
162
"possible conflicts between how the bases handle the ``args`` attribute, as "
163
163
"well as due to possible memory layout incompatibilities."
164
164
msgstr ""
165
- "使用者的程式碼可以建立繼承自例外類型的子類別。建議一次只繼承一種例外類型以避 "
165
+ "使用者的程式碼可以建立繼承自例外型別的子類別。建議一次只繼承一種例外型別以避 "
166
166
"免在基底類別之間如何處理 ``args`` 屬性的任何可能衝突,以及可能的記憶體佈局 "
167
167
"(memory layout) 不相容。"
168
168
@@ -176,9 +176,9 @@ msgid ""
176
176
"it's recommended to avoid subclassing multiple exception types altogether."
177
177
msgstr ""
178
178
"為了效率,大部分的內建例外使用 C 來實作,參考 :source:`Objects/exceptions."
179
- "c`。一些例外有客製化的記憶體佈局,使其不可能建立一個繼承多種例外類型的子類 "
180
- "別。類型的記憶體佈局是實作細節且可能會在不同 Python 版本間改變,造成未來新的"
181
- "衝突。因此,總之建議避免繼承多種例外類型 。"
179
+ "c`。一些例外有客製化的記憶體佈局,使其不可能建立一個繼承多種例外型別的子類 "
180
+ "別。型別的記憶體佈局是實作細節且可能會在不同 Python 版本間改變,造成未來新的"
181
+ "衝突。因此,總之建議避免繼承多種例外型別 。"
182
182
183
183
#: ../../library/exceptions.rst:105
184
184
msgid "Base classes"
@@ -879,7 +879,7 @@ msgstr ""
879
879
"可以正確地向上傳遞並導致直譯器結束。當它未被處理時,Python 直譯器會結束;不會"
880
880
"印出堆疊回溯。建構函式接受跟傳入 :func:`sys.exit` 一樣的可選引數。如果該值是"
881
881
"整數,它會指定系統的結束狀態(傳入 C 的 :c:func:`exit` 函式 );如果它是 "
882
- "``None``,結束狀態會是 0;如果它是其他類型 (例如字串),則物件的值會被印出而"
882
+ "``None``,結束狀態會是 0;如果它是其他型別 (例如字串),則物件的值會被印出而"
883
883
"結束狀態是 1。"
884
884
885
885
#: ../../library/exceptions.rst:587
@@ -908,8 +908,8 @@ msgid ""
908
908
"inappropriate type. The associated value is a string giving details about "
909
909
"the type mismatch."
910
910
msgstr ""
911
- "當一個操作或函式被用在不適合的類型的物件時會引發此例外 。關聯值是一個字串,提"
912
- "供關於不相符類型的細節 。"
911
+ "當一個操作或函式被用在不適合的型別的物件時會引發此例外 。關聯值是一個字串,提"
912
+ "供關於不相符型別的細節 。"
913
913
914
914
#: ../../library/exceptions.rst:605
915
915
msgid ""
@@ -929,7 +929,7 @@ msgid ""
929
929
"arguments with the wrong value (e.g. a number outside expected boundaries) "
930
930
"should result in a :exc:`ValueError`."
931
931
msgstr ""
932
- "傳入錯誤類型的引數 (例如當預期傳入 :class:`int` 卻傳入 :class:`list`)應該要"
932
+ "傳入錯誤型別的引數 (例如當預期傳入 :class:`int` 卻傳入 :class:`list`)應該要"
933
933
"導致 :exc:`TypeError`,但傳入帶有錯誤值的引數(例如超出預期範圍的數值)應該要"
934
934
"導致 :exc:`ValueError`。"
935
935
@@ -1009,7 +1009,7 @@ msgid ""
1009
1009
"type but an inappropriate value, and the situation is not described by a "
1010
1010
"more precise exception such as :exc:`IndexError`."
1011
1011
msgstr ""
1012
- "當一個操作或函式收到引數是正確類型但是不適合的值 ,且該情況無法被更精確的例外"
1012
+ "當一個操作或函式收到引數是正確型別但是不適合的值 ,且該情況無法被更精確的例外"
1013
1013
"例如 :exc:`IndexError` 所描述時會引發此例外。"
1014
1014
1015
1015
#: ../../library/exceptions.rst:679
@@ -1338,7 +1338,7 @@ msgid ""
1338
1338
"based on the types of the contained exceptions."
1339
1339
msgstr ""
1340
1340
"當需要引發多個不相關例外時會使用下列的類別。它們是例外階層的一部分所以可以像"
1341
- "所有其他例外一樣使用 :keyword:`except` 來處理。此外,它們會以包含的例外類型為 "
1341
+ "所有其他例外一樣使用 :keyword:`except` 來處理。此外,它們會以包含的例外型別為 "
1342
1342
"基礎來比對其子群組而被 :keyword:`except*<except_star>` 辨認出來。"
1343
1343
1344
1344
#: ../../library/exceptions.rst:932
@@ -1351,7 +1351,7 @@ msgid ""
1351
1351
"is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :"
1352
1352
"exc:`BaseExceptionGroup`."
1353
1353
msgstr ""
1354
- "這兩個例外類型都將例外包裝在序列 ``excs`` 中。``msg`` 參數必須是字串。這兩個"
1354
+ "這兩個例外型別都將例外包裝在序列 ``excs`` 中。``msg`` 參數必須是字串。這兩個"
1355
1355
"類別的差異是 :exc:`BaseExceptionGroup` 擴充了 :exc:`BaseException` 且可以包裝"
1356
1356
"任何例外,而 :exc:`ExceptionGroup` 擴充了 :exc:`Exception` 且只能包裝 :exc:"
1357
1357
"`Exception` 的子類別。這個設計使得 ``except Exception`` 可以捕捉 :exc:"
@@ -1396,9 +1396,9 @@ msgid ""
1396
1396
"type object) that accepts an exception as its single argument and returns "
1397
1397
"true for the exceptions that should be in the subgroup."
1398
1398
msgstr ""
1399
- "條件式可以是一個例外類型或是例外類型的元組 ,在此情況下,每個例外都會使用與 "
1399
+ "條件式可以是一個例外型別或是例外型別的元組 ,在此情況下,每個例外都會使用與 "
1400
1400
"``except`` 子句中使用的相同檢查方法來檢查是否有匹配。條件式也可以是一個可呼叫"
1401
- "物件(除了類型物件之外 ),其接受一個例外作為單一引數,而如果該例外應該在子群"
1401
+ "物件(除了型別物件之外 ),其接受一個例外作為單一引數,而如果該例外應該在子群"
1402
1402
"組中就回傳 true。"
1403
1403
1404
1404
#: ../../library/exceptions.rst:967
@@ -1425,7 +1425,7 @@ msgstr ""
1425
1425
1426
1426
#: ../../library/exceptions.rst:978
1427
1427
msgid "``condition`` can be any callable which is not a type object."
1428
- msgstr "``condition`` 可以是任何不是類型物件的可呼叫物件 。"
1428
+ msgstr "``condition`` 可以是任何不是型別物件的可呼叫物件 。"
1429
1429
1430
1430
#: ../../library/exceptions.rst:983
1431
1431
msgid ""
0 commit comments