diff --git a/library/heapq.po b/library/heapq.po index 21b46cfbac..a64f8d6756 100644 --- a/library/heapq.po +++ b/library/heapq.po @@ -10,7 +10,7 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-10-19 17:24+0800\n" -"PO-Revision-Date: 2023-06-28 14:36+0800\n" +"PO-Revision-Date: 2023-06-29 12:10+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -245,6 +245,8 @@ msgid "" "pushing all values onto a heap and then popping off the smallest values one " "at a time::" msgstr "" +"`堆積排序 (heapsort) `_ 可以透過將所" +"有的值推入一個 heap,並且從 heap 中一個接一個彈出最小元素來實作:" #: ../../library/heapq.rst:151 msgid "" @@ -264,13 +266,15 @@ msgstr "" #: ../../library/heapq.rst:167 msgid "Priority Queue Implementation Notes" -msgstr "優先佇列 (Priority Queue) 實作細節" +msgstr "優先佇列實作細節" #: ../../library/heapq.rst:169 msgid "" "A `priority queue `_ is common " "use for a heap, and it presents several implementation challenges:" msgstr "" +"`優先佇列 (priority queue) `_ " +"是 heap 的常見用途之一,實作優先佇列伴隨著下列挑戰:" #: ../../library/heapq.rst:172 msgid "" @@ -322,6 +326,8 @@ msgid "" "wrapper class that ignores the task item and only compares the priority " "field::" msgstr "" +"task 無法比較的另一個解決方案是建立一個包裝器類別,該類別忽略 task 項目,只比" +"較優先等級:" #: ../../library/heapq.rst:201 msgid "" @@ -362,6 +368,8 @@ msgid "" "The strange invariant above is meant to be an efficient memory " "representation for a tournament. The numbers below are *k*, not ``a[k]``::" msgstr "" +"上述乍看之下有些奇怪的不變式,是為了實作一個對記憶體來說有效率的方法,其表示" +"方式如同錦標賽一般。下列的數字為 *k*,而不是 ``a[k]``:" #: ../../library/heapq.rst:259 msgid "" @@ -375,6 +383,12 @@ msgid "" "two cells it tops contain three different items, but the top cell \"wins\" " "over the two topped cells." msgstr "" +"在上面的樹當中,每個單元 *k* 都會位在 ``2*k+1`` 與 ``2*k+2`` 上方。如同體育賽" +"事常見的錦標賽般,每個單元可視為其下方兩個單元當中的贏家,我們可以透過追溯整" +"棵樹來找到該贏家曾經對戰過的所有對手。然而,在許多電腦應用中,我們不需要追溯" +"贏家的完整對戰歷史。為了能更有效率地使用記憶體,當一個贏家晉級勝出時,我們用" +"下方較低層級的另一個項目來取代它,至此規則變為一個單元以及它下方兩個單元,包" +"含三個不同項目,但是最上方的單元「勝過」下方兩個單元。" #: ../../library/heapq.rst:268 msgid ""