diff --git a/library/heapq.po b/library/heapq.po index f99b75b778..21b46cfbac 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: 2017-09-22 18:26+0000\n" +"PO-Revision-Date: 2023-06-28 14:36+0800\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -19,6 +19,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.3.2\n" #: ../../library/heapq.rst:2 msgid ":mod:`heapq` --- Heap queue algorithm" @@ -181,22 +182,21 @@ msgstr "" "一個比較的依據。預設的值是 ``None`` (直接比較元素)。" #: ../../library/heapq.rst:102 -#, fuzzy msgid "" "*reverse* is a boolean value. If set to ``True``, then the input elements " "are merged as if each comparison were reversed. To achieve behavior similar " "to ``sorted(itertools.chain(*iterables), reverse=True)``, all iterables must " "be sorted from largest to smallest." msgstr "" -"*reverse* 是一個布林值。如果設定為 ``True`` ,那輸入的元素被 merge 時每一個比" -"較結果都是相反的。" +"*reverse* 是一個布林值,如果設定為 ``True`` ,則輸入的元素將以相反的比較順序" +"進行合併。為了達成類似 ``sorted(itertools.chain(*iterables), reverse=True)`` " +"的行為,所有 iterables 必須由大到小排序。" #: ../../library/heapq.rst:107 msgid "Added the optional *key* and *reverse* parameters." msgstr "加入選用參數 *key* 和 *reverse* 。" #: ../../library/heapq.rst:113 -#, fuzzy msgid "" "Return a list with the *n* largest elements from the dataset defined by " "*iterable*. *key*, if provided, specifies a function of one argument that " @@ -204,13 +204,12 @@ msgid "" "example, ``key=str.lower``). Equivalent to: ``sorted(iterable, key=key, " "reverse=True)[:n]``." msgstr "" -"回傳一個包含資料 *iterable* 中前 *n* 大元素的 list 。如果有指定 *key* 參數," -"*key* 會是只有一個參數的函式,用來從每一個 *iterable* 的元素中決定一個比較的" -"依據:``key=str.lower`` 等價於 ``sorted(iterable, key=key, reverse=True)[:" -"n]``" +"回傳一個包含資料 *iterable* 中前 *n* 大元素的 list 。如果有指定 *key* 引數," +"*key* 會是只有一個引數的函式,用來從每一個在 *iterable* 中的元素提取一個比較" +"的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key, " +"reverse=True)[:n]`` 。" #: ../../library/heapq.rst:122 -#, fuzzy msgid "" "Return a list with the *n* smallest elements from the dataset defined by " "*iterable*. *key*, if provided, specifies a function of one argument that " @@ -218,9 +217,10 @@ msgid "" "example, ``key=str.lower``). Equivalent to: ``sorted(iterable, key=key)[:" "n]``." msgstr "" -"回傳一個包含資料 *iterable* 中前 *n* 小元素的 list 。如果有指定 *key* 參數," -"*key* 會是只有一個參數的函式,用來從每一個 *iterable* 的元素中決定一個比較的" -"依據:``key=str.lower`` 等價於 ``sorted(iterable, key=key)[:n]``" +"回傳一個包含資料 *iterable* 中前 *n* 小元素的 list 。如果有指定 *key* 引數," +"*key* 會是只有一個引數的函式,用來從每一個在 *iterable* 中的元素提取一個比較" +"的依據(例如 ``key=str.lower`` )。效果相當於 ``sorted(iterable, key=key)[:" +"n]`` 。" #: ../../library/heapq.rst:128 msgid "" @@ -390,13 +390,13 @@ msgstr "" #: ../../library/heapq.rst:275 msgid "" "A nice feature of this sort is that you can efficiently insert new items " -"while the sort is going on, provided that the inserted items are not \"better" -"\" than the last 0'th element you extracted. This is especially useful in " -"simulation contexts, where the tree holds all incoming events, and the \"win" -"\" condition means the smallest scheduled time. When an event schedules " -"other events for execution, they are scheduled into the future, so they can " -"easily go into the heap. So, a heap is a good structure for implementing " -"schedulers (this is what I used for my MIDI sequencer :-)." +"while the sort is going on, provided that the inserted items are not " +"\"better\" than the last 0'th element you extracted. This is especially " +"useful in simulation contexts, where the tree holds all incoming events, and " +"the \"win\" condition means the smallest scheduled time. When an event " +"schedules other events for execution, they are scheduled into the future, so " +"they can easily go into the heap. So, a heap is a good structure for " +"implementing schedulers (this is what I used for my MIDI sequencer :-)." msgstr "" #: ../../library/heapq.rst:284