@@ -162,7 +162,7 @@ msgid ""
162162"possible conflicts between how the bases handle the ``args`` attribute, as "
163163"well as due to possible memory layout incompatibilities."
164164msgstr ""
165- "使用者的程式碼可以建立繼承自例外類型的子類別。建議一次只繼承一種例外類型以避 "
165+ "使用者的程式碼可以建立繼承自例外型別的子類別。建議一次只繼承一種例外型別以避 "
166166"免在基底類別之間如何處理 ``args`` 屬性的任何可能衝突,以及可能的記憶體佈局 "
167167"(memory layout) 不相容。"
168168
@@ -176,9 +176,9 @@ msgid ""
176176"it's recommended to avoid subclassing multiple exception types altogether."
177177msgstr ""
178178"為了效率,大部分的內建例外使用 C 來實作,參考 :source:`Objects/exceptions."
179- "c`。一些例外有客製化的記憶體佈局,使其不可能建立一個繼承多種例外類型的子類 "
180- "別。類型的記憶體佈局是實作細節且可能會在不同 Python 版本間改變,造成未來新的"
181- "衝突。因此,總之建議避免繼承多種例外類型 。"
179+ "c`。一些例外有客製化的記憶體佈局,使其不可能建立一個繼承多種例外型別的子類 "
180+ "別。型別的記憶體佈局是實作細節且可能會在不同 Python 版本間改變,造成未來新的"
181+ "衝突。因此,總之建議避免繼承多種例外型別 。"
182182
183183#: ../../library/exceptions.rst:105
184184msgid "Base classes"
@@ -879,7 +879,7 @@ msgstr ""
879879"可以正確地向上傳遞並導致直譯器結束。當它未被處理時,Python 直譯器會結束;不會"
880880"印出堆疊回溯。建構函式接受跟傳入 :func:`sys.exit` 一樣的可選引數。如果該值是"
881881"整數,它會指定系統的結束狀態(傳入 C 的 :c:func:`exit` 函式 );如果它是 "
882- "``None``,結束狀態會是 0;如果它是其他類型 (例如字串),則物件的值會被印出而"
882+ "``None``,結束狀態會是 0;如果它是其他型別 (例如字串),則物件的值會被印出而"
883883"結束狀態是 1。"
884884
885885#: ../../library/exceptions.rst:587
@@ -908,8 +908,8 @@ msgid ""
908908"inappropriate type. The associated value is a string giving details about "
909909"the type mismatch."
910910msgstr ""
911- "當一個操作或函式被用在不適合的類型的物件時會引發此例外 。關聯值是一個字串,提"
912- "供關於不相符類型的細節 。"
911+ "當一個操作或函式被用在不適合的型別的物件時會引發此例外 。關聯值是一個字串,提"
912+ "供關於不相符型別的細節 。"
913913
914914#: ../../library/exceptions.rst:605
915915msgid ""
@@ -929,7 +929,7 @@ msgid ""
929929"arguments with the wrong value (e.g. a number outside expected boundaries) "
930930"should result in a :exc:`ValueError`."
931931msgstr ""
932- "傳入錯誤類型的引數 (例如當預期傳入 :class:`int` 卻傳入 :class:`list`)應該要"
932+ "傳入錯誤型別的引數 (例如當預期傳入 :class:`int` 卻傳入 :class:`list`)應該要"
933933"導致 :exc:`TypeError`,但傳入帶有錯誤值的引數(例如超出預期範圍的數值)應該要"
934934"導致 :exc:`ValueError`。"
935935
@@ -1009,7 +1009,7 @@ msgid ""
10091009"type but an inappropriate value, and the situation is not described by a "
10101010"more precise exception such as :exc:`IndexError`."
10111011msgstr ""
1012- "當一個操作或函式收到引數是正確類型但是不適合的值 ,且該情況無法被更精確的例外"
1012+ "當一個操作或函式收到引數是正確型別但是不適合的值 ,且該情況無法被更精確的例外"
10131013"例如 :exc:`IndexError` 所描述時會引發此例外。"
10141014
10151015#: ../../library/exceptions.rst:679
@@ -1338,7 +1338,7 @@ msgid ""
13381338"based on the types of the contained exceptions."
13391339msgstr ""
13401340"當需要引發多個不相關例外時會使用下列的類別。它們是例外階層的一部分所以可以像"
1341- "所有其他例外一樣使用 :keyword:`except` 來處理。此外,它們會以包含的例外類型為 "
1341+ "所有其他例外一樣使用 :keyword:`except` 來處理。此外,它們會以包含的例外型別為 "
13421342"基礎來比對其子群組而被 :keyword:`except*<except_star>` 辨認出來。"
13431343
13441344#: ../../library/exceptions.rst:932
@@ -1351,7 +1351,7 @@ msgid ""
13511351"is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :"
13521352"exc:`BaseExceptionGroup`."
13531353msgstr ""
1354- "這兩個例外類型都將例外包裝在序列 ``excs`` 中。``msg`` 參數必須是字串。這兩個"
1354+ "這兩個例外型別都將例外包裝在序列 ``excs`` 中。``msg`` 參數必須是字串。這兩個"
13551355"類別的差異是 :exc:`BaseExceptionGroup` 擴充了 :exc:`BaseException` 且可以包裝"
13561356"任何例外,而 :exc:`ExceptionGroup` 擴充了 :exc:`Exception` 且只能包裝 :exc:"
13571357"`Exception` 的子類別。這個設計使得 ``except Exception`` 可以捕捉 :exc:"
@@ -1396,9 +1396,9 @@ msgid ""
13961396"type object) that accepts an exception as its single argument and returns "
13971397"true for the exceptions that should be in the subgroup."
13981398msgstr ""
1399- "條件式可以是一個例外類型或是例外類型的元組 ,在此情況下,每個例外都會使用與 "
1399+ "條件式可以是一個例外型別或是例外型別的元組 ,在此情況下,每個例外都會使用與 "
14001400"``except`` 子句中使用的相同檢查方法來檢查是否有匹配。條件式也可以是一個可呼叫"
1401- "物件(除了類型物件之外 ),其接受一個例外作為單一引數,而如果該例外應該在子群"
1401+ "物件(除了型別物件之外 ),其接受一個例外作為單一引數,而如果該例外應該在子群"
14021402"組中就回傳 true。"
14031403
14041404#: ../../library/exceptions.rst:967
@@ -1425,7 +1425,7 @@ msgstr ""
14251425
14261426#: ../../library/exceptions.rst:978
14271427msgid "``condition`` can be any callable which is not a type object."
1428- msgstr "``condition`` 可以是任何不是類型物件的可呼叫物件 。"
1428+ msgstr "``condition`` 可以是任何不是型別物件的可呼叫物件 。"
14291429
14301430#: ../../library/exceptions.rst:983
14311431msgid ""
0 commit comments