Skip to content

Commit e161349

Browse files
committed
feat(howto/sorting): update translation
1 parent 2501ea7 commit e161349

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

howto/sorting.po

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
1111
"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"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1515
"tw)\n"
1616
"Language: zh_TW\n"
1717
"MIME-Version: 1.0\n"
1818
"Content-Type: text/plain; charset=UTF-8\n"
1919
"Content-Transfer-Encoding: 8bit\n"
2020
"Plural-Forms: nplurals=1; plural=0;\n"
21+
"X-Generator: Poedit 3.4.2\n"
2122

2223
#: ../../howto/sorting.rst:4
2324
msgid "Sorting Techniques"
@@ -124,10 +125,12 @@ msgid ""
124125
"or they can be instances of :class:`~dataclasses.dataclass` or a :term:"
125126
"`named tuple`."
126127
msgstr ""
128+
"具有命名屬性的物件可以如上方的方式使用一個常規的類別建立,或是他們可以是 :"
129+
"class:`~dataclasses.dataclass` 的實例或是一個 :term:`named tuple`。"
127130

128131
#: ../../howto/sorting.rst:104
129132
msgid "Operator Module Functions and Partial Function Evaluation"
130-
msgstr ""
133+
msgstr "Operator 模組函式以及部份函式 (partial function) 評估"
131134

132135
#: ../../howto/sorting.rst:106
133136
msgid ""
@@ -159,6 +162,9 @@ msgid ""
159162
"<https://en.wikipedia.org/wiki/Arity>`_ of a multi-argument function making "
160163
"it suitable for use as a key-function."
161164
msgstr ""
165+
"模組 :mod:`functools` 提供了另一個製作鍵函式的好用工具。:func:`~functools."
166+
"partial` 函式可以減少多引數函式的\\ `引數數目 <https://en.wikipedia.org/wiki/"
167+
"Arity>`_,並使它被當作鍵函式使用時來的更合適。"
162168

163169
#: ../../howto/sorting.rst:153
164170
msgid "Ascending and Descending"
@@ -387,6 +393,10 @@ msgid ""
387393
"six comparison methods be implemented. The :func:`~functools.total_ordering` "
388394
"decorator is provided to make that task easier."
389395
msgstr ""
396+
"然而,請注意,當 :meth:`~object.__lt__` 沒有被實做時,``<`` 可以回退 (fall "
397+
"back) 使用 :meth:`~object.__gt__`\\ (有關技術上的細節資訊請看 :func:`object."
398+
"__lt__` )。為了避免意外發生,:pep:`8` 建議所有六種的比較函式需要被實做。裝飾"
399+
"子 :func:`~functools.total_ordering` 被提供用來讓任務更為簡單。"
390400

391401
#: ../../howto/sorting.rst:314
392402
msgid ""
@@ -400,20 +410,24 @@ msgstr ""
400410

401411
#: ../../howto/sorting.rst:327
402412
msgid "Partial Sorts"
403-
msgstr ""
413+
msgstr "部份排序"
404414

405415
#: ../../howto/sorting.rst:329
406416
msgid ""
407417
"Some applications require only some of the data to be ordered. The standard "
408418
"library provides several tools that do less work than a full sort:"
409419
msgstr ""
420+
"有些應用程式只需要排序部份的資料。基礎函式庫提供相較做完整排序更為輕鬆的多項"
421+
"工具:"
410422

411423
#: ../../howto/sorting.rst:332
412424
msgid ""
413425
":func:`min` and :func:`max` return the smallest and largest values, "
414426
"respectively. These functions make a single pass over the input data and "
415427
"require almost no auxiliary memory."
416428
msgstr ""
429+
":func:`min` 以及 :func:`max` 會分別回傳最小值及最大值。這些函式會將輸入資料進"
430+
"行一次傳遞且幾乎無須輔助記憶體。"
417431

418432
#: ../../howto/sorting.rst:336
419433
msgid ""
@@ -423,6 +437,9 @@ msgid ""
423437
"that are small relative to the number of inputs, these functions make far "
424438
"fewer comparisons than a full sort."
425439
msgstr ""
440+
":func:`heapq.nsmallest` 以及 :func:`heapq.nlargest` 會分別回傳 *n* 個最小值及"
441+
"最大值。這些函式會將資料進行一次傳遞且一次只會保留 *n* 個元素在記憶體中。對於"
442+
"相對於輸入數量較小的 *n* 個值,這些函數進行的比較比完整排序要少得多。"
426443

427444
#: ../../howto/sorting.rst:342
428445
msgid ""
@@ -431,6 +448,9 @@ msgid ""
431448
"position ``0``. These functions are suitable for implementing priority "
432449
"queues which are commonly used for task scheduling."
433450
msgstr ""
451+
":func:`heapq.heappush` 以及 :func:`heapq.heappop` 建立並維護部分排序的資料排"
452+
"列,將最小元素保留在位置 ``0``。這些函式適合實做在常用於任務調度的優先權佇"
453+
"列。"
434454

435455
#~ msgid "Sorting HOW TO"
436456
#~ msgstr "如何排序"

0 commit comments

Comments
 (0)