@@ -9,15 +9,16 @@ msgstr ""
9
9
"Project-Id-Version : Python 3.12\n "
10
10
"Report-Msgid-Bugs-To : \n "
11
11
"POT-Creation-Date : 2024-02-21 00:03+0000\n "
12
- "PO-Revision-Date : 2023-08-12 15:09 +0800\n "
13
- "Last-Translator : Adrian Liaw <adrianliaw2000 @gmail.com>\n "
12
+ "PO-Revision-Date : 2024-05-15 17:32 +0800\n "
13
+ "Last-Translator : Li-Hung Wang <therockleona @gmail.com>\n "
14
14
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
15
15
"tw)\n "
16
16
"Language : zh_TW\n "
17
17
"MIME-Version : 1.0\n "
18
18
"Content-Type : text/plain; charset=UTF-8\n "
19
19
"Content-Transfer-Encoding : 8bit\n "
20
20
"Plural-Forms : nplurals=1; plural=0;\n "
21
+ "X-Generator : Poedit 3.4.2\n "
21
22
22
23
#: ../../howto/sorting.rst:4
23
24
msgid "Sorting Techniques"
@@ -124,10 +125,12 @@ msgid ""
124
125
"or they can be instances of :class:`~dataclasses.dataclass` or a :term:"
125
126
"`named tuple`."
126
127
msgstr ""
128
+ "具有命名屬性的物件可以如上方的方式使用一個常規的類別建立,或是他們可以是 :"
129
+ "class:`~dataclasses.dataclass` 的實例或是一個 :term:`named tuple`。"
127
130
128
131
#: ../../howto/sorting.rst:104
129
132
msgid "Operator Module Functions and Partial Function Evaluation"
130
- msgstr ""
133
+ msgstr "Operator 模組函式以及部份函式 (partial function) 評估 "
131
134
132
135
#: ../../howto/sorting.rst:106
133
136
msgid ""
@@ -159,6 +162,9 @@ msgid ""
159
162
"<https://en.wikipedia.org/wiki/Arity>`_ of a multi-argument function making "
160
163
"it suitable for use as a key-function."
161
164
msgstr ""
165
+ "模組 :mod:`functools` 提供了另一個製作鍵函式的好用工具。:func:`~functools."
166
+ "partial` 函式可以減少多引數函式的\\ `引數數目 <https://en.wikipedia.org/wiki/"
167
+ "Arity>`_,並使它被當作鍵函式使用時來的更合適。"
162
168
163
169
#: ../../howto/sorting.rst:153
164
170
msgid "Ascending and Descending"
@@ -387,6 +393,10 @@ msgid ""
387
393
"six comparison methods be implemented. The :func:`~functools.total_ordering` "
388
394
"decorator is provided to make that task easier."
389
395
msgstr ""
396
+ "然而,請注意,當 :meth:`~object.__lt__` 沒有被實做時,``<`` 可以回退 (fall "
397
+ "back) 使用 :meth:`~object.__gt__`\\ (有關技術上的細節資訊請看 :func:`object."
398
+ "__lt__` )。為了避免意外發生,:pep:`8` 建議所有六種的比較函式需要被實做。裝飾"
399
+ "子 :func:`~functools.total_ordering` 被提供用來讓任務更為簡單。"
390
400
391
401
#: ../../howto/sorting.rst:314
392
402
msgid ""
@@ -400,20 +410,24 @@ msgstr ""
400
410
401
411
#: ../../howto/sorting.rst:327
402
412
msgid "Partial Sorts"
403
- msgstr ""
413
+ msgstr "部份排序 "
404
414
405
415
#: ../../howto/sorting.rst:329
406
416
msgid ""
407
417
"Some applications require only some of the data to be ordered. The standard "
408
418
"library provides several tools that do less work than a full sort:"
409
419
msgstr ""
420
+ "有些應用程式只需要排序部份的資料。基礎函式庫提供相較做完整排序更為輕鬆的多項"
421
+ "工具:"
410
422
411
423
#: ../../howto/sorting.rst:332
412
424
msgid ""
413
425
":func:`min` and :func:`max` return the smallest and largest values, "
414
426
"respectively. These functions make a single pass over the input data and "
415
427
"require almost no auxiliary memory."
416
428
msgstr ""
429
+ ":func:`min` 以及 :func:`max` 會分別回傳最小值及最大值。這些函式會將輸入資料進"
430
+ "行一次傳遞且幾乎無須輔助記憶體。"
417
431
418
432
#: ../../howto/sorting.rst:336
419
433
msgid ""
@@ -423,6 +437,9 @@ msgid ""
423
437
"that are small relative to the number of inputs, these functions make far "
424
438
"fewer comparisons than a full sort."
425
439
msgstr ""
440
+ ":func:`heapq.nsmallest` 以及 :func:`heapq.nlargest` 會分別回傳 *n* 個最小值及"
441
+ "最大值。這些函式會將資料進行一次傳遞且一次只會保留 *n* 個元素在記憶體中。對於"
442
+ "相對於輸入數量較小的 *n* 個值,這些函數進行的比較比完整排序要少得多。"
426
443
427
444
#: ../../howto/sorting.rst:342
428
445
msgid ""
@@ -431,6 +448,9 @@ msgid ""
431
448
"position ``0``. These functions are suitable for implementing priority "
432
449
"queues which are commonly used for task scheduling."
433
450
msgstr ""
451
+ ":func:`heapq.heappush` 以及 :func:`heapq.heappop` 建立並維護部分排序的資料排"
452
+ "列,將最小元素保留在位置 ``0``。這些函式適合實做在常用於任務調度的優先權佇"
453
+ "列。"
434
454
435
455
#~ msgid "Sorting HOW TO"
436
456
#~ msgstr "如何排序"
0 commit comments