77msgstr ""
88"Project-Id-Version : Python 3.14\n "
99"Report-Msgid-Bugs-To : \n "
10- "POT-Creation-Date : 2025-01-22 00:13 +0000\n "
10+ "POT-Creation-Date : 2026-06-30 00:39 +0000\n "
1111"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1212"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
1313"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -28,11 +28,12 @@ msgid ""
2828"in Python 2.3, but it is still used in later versions -- including Python 3."
2929msgstr ""
3030"這是一份歷史文件,作為正式文件的附錄提供。此處討論的方法解析順序 (Method "
31- "Resolution Order) 是在 Python 2.3 中 *引入* 的,但仍在後續版本中使用,包 "
32- "括 Python 3。"
31+ "Resolution Order) 是在 Python 2.3 中 *引入* 的,但仍在後續版本中使用,包括 "
32+ "Python 3。"
3333
3434#: ../../howto/mro.rst:13
35- msgid "By `Michele Simionato <https://www.phyast.pitt.edu/~micheles/>`__."
35+ #, fuzzy
36+ msgid "By `Michele Simionato <https://github.com/micheles>`__."
3637msgstr "作者:`Michele Simionato <https://www.phyast.pitt.edu/~micheles/>`__。"
3738
3839#: ../../howto/mro.rst:0
@@ -78,10 +79,10 @@ msgid ""
7879"Rossum who enthusiastically added this document to the official Python 2.3 "
7980"home-page.*"
8081msgstr ""
81- "*感謝 Python 郵件列表中所有給予我支持的人。Paul Foley 指出了各種不精確之處,並 "
82- "促使我加入了區域優先順序 (local precedence ordering)的部分。David Goodger 協 "
83- "助 reStructuredText 的格式化。David Mertz 協助編輯。最後,Guido van Rossum 熱 "
84- "情地將此文件加入到 Python 2.3 官方首頁。*"
82+ "*感謝 Python 郵件列表中所有給予我支持的人。Paul Foley 指出了各種不精確之處,"
83+ "並促使我加入了區域優先順序 (local precedence ordering)的部分。David Goodger "
84+ "協助 reStructuredText 的格式化。David Mertz 協助編輯。最後,Guido van Rossum "
85+ "熱情地將此文件加入到 Python 2.3 官方首頁。*"
8586
8687#: ../../howto/mro.rst:40
8788msgid "The beginning"
@@ -122,10 +123,10 @@ msgid ""
122123"breaking of code is expected. Therefore:"
123124msgstr ""
124125"首先讓我指出,我要說的僅適用於 Python 2.2 中引入的 *新式類別(new style "
125- "classes)*:*經典類別(classic classes)* 維持其舊有的方法解析順序,即深度 "
126- "優先然後由左至右 。因此,經典類別的舊程式碼不會受到影響;即使原則上 Python 2.2 "
127- "新式類別的程式碼可能會受影響,但實際上 C3 解析順序與 Python 2.2 方法解析順序不 "
128- "同的情況極為罕見 ,因此預期不會真正破壞程式碼。因此:"
126+ "classes)*:*經典類別(classic classes)* 維持其舊有的方法解析順序,即深度優 "
127+ "先然後由左至右 。因此,經典類別的舊程式碼不會受到影響;即使原則上 Python 2.2 "
128+ "新式類別的程式碼可能會受影響,但實際上 C3 解析順序與 Python 2.2 方法解析順序 "
129+ "不同的情況極為罕見 ,因此預期不會真正破壞程式碼。因此:"
129130
130131#: ../../howto/mro.rst:64
131132msgid "*Don't be scared!*"
@@ -185,8 +186,8 @@ msgid ""
185186msgstr ""
186187"例如,在單一繼承階層的情況下,如果 C 是 C1 的子類別,而 C1 是 C2 的子類別,那"
187188"麼 C 的線性化就是串列 [C, C1, C2]。然而,在多重繼承階層中,線性化的建構更加複"
188- "雜,因為要建構一個遵守\\ *區域優先順序(local precedence ordering)* 和\\ *"
189- "單調性 (monotonicity)* 的線性化更加困難。"
189+ "雜,因為要建構一個遵守\\ *區域優先順序(local precedence ordering)* 和\\ *單 "
190+ "調性 (monotonicity)* 的線性化更加困難。"
190191
191192#: ../../howto/mro.rst:96
192193msgid ""
@@ -209,8 +210,8 @@ msgid ""
209210"hierarchies, where it is not possible to derive a class such that its "
210211"linearization respects all the desired properties."
211212msgstr ""
212- "並非所有類別都能進行線性化。在複雜的階層結構中,有些情況下無法衍生出一個類別, "
213- "使其線性化遵守所有所需的屬性。"
213+ "並非所有類別都能進行線性化。在複雜的階層結構中,有些情況下無法衍生出一個類 "
214+ "別, 使其線性化遵守所有所需的屬性。"
214215
215216#: ../../howto/mro.rst:108
216217msgid "Here I give an example of this situation. Consider the hierarchy"
@@ -255,8 +256,8 @@ msgid ""
255256"X precedes Y in A, but Y precedes X in B, therefore the method resolution "
256257"order would be ambiguous in C."
257258msgstr ""
258- "在這種情況下,不可能從 A 和 B 衍生出新的類別 C,因為 X 在 A 中先於 Y,但 Y 在 "
259- "B 中先於 X,因此 C 的方法解析順序會產生歧義。"
259+ "在這種情況下,不可能從 A 和 B 衍生出新的類別 C,因為 X 在 A 中先於 Y,但 Y "
260+ "在 B 中先於 X,因此 C 的方法解析順序會產生歧義。"
260261
261262#: ../../howto/mro.rst:137
262263msgid ""
@@ -265,9 +266,9 @@ msgid ""
265266"hierarchies. Python 2.2 instead does not raise an exception, but chooses an "
266267"*ad hoc* ordering (CABXYO in this case)."
267268msgstr ""
268- "Python 2.3 在這種情況下會引發例外(TypeError: MRO conflict among bases Y, X), "
269- "防止程式設計師建立有歧義的階層結構。Python 2.2 則不會引發例外,而是選擇 *ad "
270- "hoc* 順序(在這種情況下為 CABXYO)。"
269+ "Python 2.3 在這種情況下會引發例外(TypeError: MRO conflict among bases Y, "
270+ "X), 防止程式設計師建立有歧義的階層結構。Python 2.2 則不會引發例外,而是選擇 "
271+ "*ad hoc* 順序(在這種情況下為 CABXYO)。"
271272
272273#: ../../howto/mro.rst:143
273274msgid "The C3 Method Resolution Order"
@@ -277,7 +278,8 @@ msgstr "C3 方法解析順序"
277278msgid ""
278279"Let me introduce a few simple notations which will be useful for the "
279280"following discussion. I will use the shortcut notation::"
280- msgstr "讓我介紹一些簡單的符號標示法,這對以下討論很有用。我將使用簡寫符號: ::"
281+ msgstr ""
282+ "讓我介紹一些簡單的符號標示法,這對以下討論很有用。我將使用簡寫符號: ::"
281283
282284#: ../../howto/mro.rst:148
283285msgid "C1 C2 ... CN"
@@ -346,8 +348,7 @@ msgstr "L[C(B1 ... BN)] = C + merge(L[B1] ... L[BN], B1 ... BN)"
346348msgid ""
347349"In particular, if C is the ``object`` class, which has no parents, the "
348350"linearization is trivial::"
349- msgstr ""
350- "特別是如果 C 是沒有父類別的 ``object`` 類別,那麼線性化是簡單的:"
351+ msgstr "特別是如果 C 是沒有父類別的 ``object`` 類別,那麼線性化是簡單的:"
351352
352353#: ../../howto/mro.rst:183
353354msgid "L[object] = object."
@@ -371,8 +372,9 @@ msgid ""
371372msgstr ""
372373"*取第一個串列的頭部,即 L[B1][0];如果此頭部不在其他任何串列的尾部中,那麼將"
373374"它加入到 C 的線性化中,並從合併中的所有串列移除它;否則查看下一個串列的頭部,"
374- "如果它是一個好的頭部就取它。然後重複此操作,直到所有類別都被移除或無法找到好的"
375- "頭部。在後面這種情況下,無法建構合併,Python 2.3 將拒絕建立類別 C 並引發例外。*"
375+ "如果它是一個好的頭部就取它。然後重複此操作,直到所有類別都被移除或無法找到好"
376+ "的頭部。在後面這種情況下,無法建構合併,Python 2.3 將拒絕建立類別 C 並引發例"
377+ "外。*"
376378
377379#: ../../howto/mro.rst:197
378380msgid ""
@@ -381,8 +383,8 @@ msgid ""
381383"preserved (as in the example of serious order disagreement discussed above) "
382384"then the merge cannot be computed."
383385msgstr ""
384- "此規則確保合併操作\\ *保留*\\ 順序(如果順序可以被保留)。另一方面,如果無法保 "
385- "留順序 (如上面討論的嚴重順序分歧的範例),則無法計算合併。"
386+ "此規則確保合併操作\\ *保留*\\ 順序(如果順序可以被保留)。另一方面,如果無法 "
387+ "保留順序 (如上面討論的嚴重順序分歧的範例),則無法計算合併。"
386388
387389#: ../../howto/mro.rst:202
388390msgid ""
@@ -401,7 +403,8 @@ msgid ""
401403"However, in the case of multiple inheritance things are more cumbersome and "
402404"I don't expect you can understand the rule without a couple of examples ;-)"
403405msgstr ""
404- "但是,在多重繼承的情況下,事情更加複雜,我不指望你能在沒有幾個範例的情況下理解這個規則 ;-)"
406+ "但是,在多重繼承的情況下,事情更加複雜,我不指望你能在沒有幾個範例的情況下理"
407+ "解這個規則 ;-)"
405408
406409#: ../../howto/mro.rst:212
407410msgid "Examples"
@@ -558,12 +561,12 @@ msgstr "第二個範例的線性化之計算我留給讀者當作練習:"
558561
559562#: ../../howto/mro.rst:303
560563msgid ""
561- "The only difference with the previous example is the change B(D,E) --> "
562- "B(E, D); however even such a little modification completely changes the "
563- "ordering of the hierarchy:"
564+ "The only difference with the previous example is the change B(D,E) --> B(E, "
565+ "D); however even such a little modification completely changes the ordering "
566+ "of the hierarchy:"
564567msgstr ""
565- "與上一個範例的唯一區別是 B(D,E) --> B(E,D) 的變化;但是即使是這樣小小的修改,也完 "
566- "全改變了階層結構的順序 :"
568+ "與上一個範例的唯一區別是 B(D,E) --> B(E,D) 的變化;但是即使是這樣小小的修改,"
569+ "也完全改變了階層結構的順序 :"
567570
568571#: ../../howto/mro.rst:307
569572msgid ""
@@ -690,8 +693,8 @@ msgid ""
690693"both the MRO for classic classes and the MRO for new style classes in Python "
691694"2.2 are bad."
692695msgstr ""
693- "當 MRO 打破諸如區域優先順序和單調性之類的基本屬性時,MRO 是\\ *不良*\\ 的。在本節 "
694- "中 ,我將證明經典類別的 MRO 和 Python 2.2 的新式類別的 MRO 都是不好的。"
696+ "當 MRO 打破諸如區域優先順序和單調性之類的基本屬性時,MRO 是\\ *不良*\\ 的。在 "
697+ "本節中 ,我將證明經典類別的 MRO 和 Python 2.2 的新式類別的 MRO 都是不好的。"
695698
696699#: ../../howto/mro.rst:377
697700msgid ""
@@ -728,12 +731,12 @@ msgstr ""
728731#: ../../howto/mro.rst:399
729732msgid ""
730733"We see that class G inherits from F and E, with F *before* E: therefore we "
731- "would expect the attribute *G.remember2buy* to be inherited by "
732- "*F. remember2buy* and not by *E.remember2buy*: nevertheless Python 2.2 gives"
734+ "would expect the attribute *G.remember2buy* to be inherited by *F. "
735+ "remember2buy* and not by *E.remember2buy*: nevertheless Python 2.2 gives"
733736msgstr ""
734- "我們看到類別 G 從 F 和 E 繼承,F 在 E *之前*:因此,我們希望屬性 "
735- "*G. remember2buy* 被 *F.remember2buy* 繼承,而不是 *E.remember2buy*:儘管如 "
736- "此, Python 2.2 給出"
737+ "我們看到類別 G 從 F 和 E 繼承,F 在 E *之前*:因此,我們希望屬性 *G. "
738+ "remember2buy* 被 *F.remember2buy* 繼承,而不是 *E.remember2buy*:儘管如此, "
739+ "Python 2.2 給出"
737740
738741#: ../../howto/mro.rst:407
739742msgid ""
@@ -756,9 +759,9 @@ msgid ""
756759"quite non-intuitive and error prone. This is particularly true since it is "
757760"a different from old style classes:"
758761msgstr ""
759- "有人可能會說,F 在 Python 2.2 線性化中跟隨 E 的原因是 F 比 E 特化程度較低,"
760- "因為 F 是 E 的超類別;然而,局部優先順序的破壞非常不直覺且容易出錯。尤其如 "
761- "此, 因為它與舊式類別不同:"
762+ "有人可能會說,F 在 Python 2.2 線性化中跟隨 E 的原因是 F 比 E 特化程度較低,因 "
763+ "為 F 是 E 的超類別;然而,局部優先順序的破壞非常不直覺且容易出錯。尤其如此, "
764+ "因為它與舊式類別不同:"
762765
763766#: ../../howto/mro.rst:425
764767msgid ""
@@ -828,8 +831,8 @@ msgid ""
828831"enough to recognize obvious mistakes, as the duplication of classes in the "
829832"list of parents:"
830833msgstr ""
831- "與之相關的是,我指出 Python 2.3 演算法足夠聰明,可以識別出明顯的錯誤,例 "
832- "如父類別串列中類別的重複 :"
834+ "與之相關的是,我指出 Python 2.3 演算法足夠聰明,可以識別出明顯的錯誤,例如父 "
835+ "類別串列中類別的重複 :"
833836
834837#: ../../howto/mro.rst:469
835838msgid ""
@@ -936,8 +939,7 @@ msgid ""
936939"verify these linearizations as an exercise and draw the inheritance "
937940"diagram ;-) ::"
938941msgstr ""
939- "以下是根據 C3 MRO 的線性化(讀者應練習驗證這些線性化並繪製繼承"
940- "圖 ;-) : ::"
942+ "以下是根據 C3 MRO 的線性化(讀者應練習驗證這些線性化並繪製繼承圖 ;-) : ::"
941943
942944#: ../../howto/mro.rst:534
943945msgid ""
@@ -1009,12 +1011,11 @@ msgid ""
10091011"the last line to play with the various examples I have discussed in this "
10101012"paper.::"
10111013msgstr ""
1012- "本節適用於那些不耐煩、所有先前部分都跳過並直接滑到最後的讀者,也適"
1013- "用於懶得鍛鍊大腦的程式設計師。最後,這也是針對一些自負的程式"
1014- "設計師,不然她/他也不會想閱讀有關多重繼承階層中 C3 方法解析順序的文章;-)"
1015- "擁有這三種美德(注意是同時擁有,不是分開)就值得獲得獎品:獎品是一個簡短的 Python 2.2 腳"
1016- "本,可以幫你計算 2.3 MRO 而不用傷腦筋。只需更改最後一行就可以試跑我在本"
1017- "文中討論的各種範例。 ::"
1014+ "本節適用於那些不耐煩、所有先前部分都跳過並直接滑到最後的讀者,也適用於懶得鍛"
1015+ "鍊大腦的程式設計師。最後,這也是針對一些自負的程式設計師,不然她/他也不會想閱"
1016+ "讀有關多重繼承階層中 C3 方法解析順序的文章;-)擁有這三種美德(注意是同時擁"
1017+ "有,不是分開)就值得獲得獎品:獎品是一個簡短的 Python 2.2 腳本,可以幫你計算 "
1018+ "2.3 MRO 而不用傷腦筋。只需更改最後一行就可以試跑我在本文中討論的各種範例。 ::"
10181019
10191020#: ../../howto/mro.rst:574
10201021msgid ""
@@ -1205,11 +1206,11 @@ msgstr ""
12051206
12061207#: ../../howto/mro.rst:667
12071208msgid ""
1208- "The paper *A Monotonic Superclass Linearization for Dylan*: https://doi.org/ "
1209- "10.1145/236337.236343"
1209+ "The paper *A Monotonic Superclass Linearization for Dylan*: https://doi."
1210+ "org/ 10.1145/236337.236343"
12101211msgstr ""
1211- "論文 *A Monotonic Superclass Linearization for Dylan*: https://doi.org/ "
1212- "10.1145/236337.236343"
1212+ "論文 *A Monotonic Superclass Linearization for Dylan*: https://doi."
1213+ "org/ 10.1145/236337.236343"
12131214
12141215#: ../../howto/mro.rst:670
12151216msgid ""
@@ -1218,5 +1219,5 @@ msgid ""
12181219"releases/2.2.2/descrintro"
12191220msgstr ""
12201221"Guido van Rossum 的文章 *Unifying types and classes in Python 2.2*:https://"
1221- "web.archive.org/web/20140210194412/http://www.python.org/download/releases/ "
1222- "2.2.2/descrintro"
1222+ "web.archive.org/web/20140210194412/http://www.python.org/download/"
1223+ "releases/ 2.2.2/descrintro"
0 commit comments