@@ -9,14 +9,15 @@ msgstr ""
9
9
"Report-Msgid-Bugs-To : \n "
10
10
"POT-Creation-Date : 2024-09-03 11:11+0800\n "
11
11
"PO-Revision-Date : 2023-08-12 15:09+0800\n "
12
- "
Last-Translator :
Adrian Liaw <[email protected] >\n"
12
+ "
Last-Translator :
Li-Hung Wang <[email protected] >\n"
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
15
15
"Language : zh_TW\n "
16
16
"MIME-Version : 1.0\n "
17
17
"Content-Type : text/plain; charset=UTF-8\n "
18
18
"Content-Transfer-Encoding : 8bit\n "
19
19
"Plural-Forms : nplurals=1; plural=0;\n "
20
+ "X-Generator : Poedit 3.4.2\n "
20
21
21
22
#: ../../howto/sorting.rst:4
22
23
msgid "Sorting Techniques"
@@ -188,10 +189,12 @@ msgid ""
188
189
"or they can be instances of :class:`~dataclasses.dataclass` or a :term:"
189
190
"`named tuple`."
190
191
msgstr ""
192
+ "具有命名屬性的物件可以如上方的方式使用一個常規的類別建立,或是他們可以是 :"
193
+ "class:`~dataclasses.dataclass` 的實例或是一個 :term:`named tuple`。"
191
194
192
195
#: ../../howto/sorting.rst:104
193
196
msgid "Operator Module Functions and Partial Function Evaluation"
194
- msgstr ""
197
+ msgstr "Operator 模組函式以及部份函式 (partial function) 評估 "
195
198
196
199
#: ../../howto/sorting.rst:106
197
200
msgid ""
@@ -255,6 +258,9 @@ msgid ""
255
258
"<https://en.wikipedia.org/wiki/Arity>`_ of a multi-argument function making "
256
259
"it suitable for use as a key-function."
257
260
msgstr ""
261
+ "模組 :mod:`functools` 提供了另一個製作鍵函式的好用工具。:func:`~functools."
262
+ "partial` 函式可以減少多引數函式的\\ `引數數目 <https://en.wikipedia.org/wiki/"
263
+ "Arity>`_,使其更適合作為鍵函式使用。"
258
264
259
265
#: ../../howto/sorting.rst:139
260
266
msgid ""
@@ -599,6 +605,10 @@ msgid ""
599
605
"six comparison methods be implemented. The :func:`~functools.total_ordering` "
600
606
"decorator is provided to make that task easier."
601
607
msgstr ""
608
+ "然而,請注意,當 :meth:`~object.__lt__` 沒有被實做時,``<`` 可以回退 (fall "
609
+ "back) 使用 :meth:`~object.__gt__`\\ (有關技術上的細節資訊請看 :func:`object."
610
+ "__lt__` )。為了避免意外發生,:pep:`8` 建議所有六種的比較函式都需要被實作。裝飾"
611
+ "器 :func:`~functools.total_ordering` 被提供用來讓任務更為簡單。"
602
612
603
613
#: ../../howto/sorting.rst:314
604
614
msgid ""
@@ -624,20 +634,24 @@ msgstr ""
624
634
625
635
#: ../../howto/sorting.rst:327
626
636
msgid "Partial Sorts"
627
- msgstr ""
637
+ msgstr "部份排序 "
628
638
629
639
#: ../../howto/sorting.rst:329
630
640
msgid ""
631
641
"Some applications require only some of the data to be ordered. The standard "
632
642
"library provides several tools that do less work than a full sort:"
633
643
msgstr ""
644
+ "有些應用程式只需要排序部份的資料。基礎函式庫提供相較做完整排序更為輕鬆的多項"
645
+ "工具:"
634
646
635
647
#: ../../howto/sorting.rst:332
636
648
msgid ""
637
649
":func:`min` and :func:`max` return the smallest and largest values, "
638
650
"respectively. These functions make a single pass over the input data and "
639
651
"require almost no auxiliary memory."
640
652
msgstr ""
653
+ ":func:`min` 以及 :func:`max` 會分別回傳最小值及最大值。這些函式會將輸入資料進"
654
+ "行一次傳遞且幾乎無須輔助記憶體。"
641
655
642
656
#: ../../howto/sorting.rst:336
643
657
msgid ""
@@ -647,6 +661,9 @@ msgid ""
647
661
"that are small relative to the number of inputs, these functions make far "
648
662
"fewer comparisons than a full sort."
649
663
msgstr ""
664
+ ":func:`heapq.nsmallest` 以及 :func:`heapq.nlargest` 會分別回傳 *n* 個最小值及"
665
+ "最大值。這些函式會將資料進行一次傳遞且一次只會保留 *n* 個元素在記憶體中。對於"
666
+ "相對於輸入數量較小的 *n* 個值,這些函數進行的比較比完整排序要少得多。"
650
667
651
668
#: ../../howto/sorting.rst:342
652
669
msgid ""
@@ -655,3 +672,7 @@ msgid ""
655
672
"position ``0``. These functions are suitable for implementing priority "
656
673
"queues which are commonly used for task scheduling."
657
674
msgstr ""
675
+ ":func:`heapq.heappush` 和 :func:`heapq.heappop` 會建立並維持一個部份排序的資料"
676
+ "排列,將最小的元素保持在位置 ``0``。這些函式適合用來實作常用於任務排程的優先"
677
+ "佇列。"
678
+
0 commit comments