11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2021 , Python Software Foundation
2+ # Copyright (C) 2001-2024 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
77# Shengjing Zhu <[email protected] >, 202088# ww song <[email protected] >, 202099# df2dc1c92e792f7ae8417c51df43db8f_594d92a <0f49be28017426edb1db1a2ab6e67088_717605>, 2020
10- # Freesand Leo <[email protected] >, 20201110# Alpha Du <[email protected] >, 20201211# Aloxaf <[email protected] >, 202013- # Siyuan Xu, 2020
12+ # Xu Siyuan, 2020
13+ # Rafael Fontenelle <[email protected] >, 20241414#
1515#, fuzzy
1616msgid ""
1717msgstr ""
1818"Project-Id-Version : Python 3.8\n "
1919"Report-Msgid-Bugs-To : \n "
20- "POT-Creation-Date : 2021-01-01 16:06 +0000\n "
20+ "POT-Creation-Date : 2024-05-17 17:02 +0000\n "
2121"PO-Revision-Date : 2020-05-30 11:55+0000\n "
22- "Last-Translator : Siyuan Xu, 2020 \n "
23- "Language-Team : Chinese (China) (https://www .transifex.com/python-doc/teams/5390/zh_CN/)\n "
22+ "
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024 \n"
23+ "Language-Team : Chinese (China) (https://app .transifex.com/python-doc/teams/5390/zh_CN/)\n "
2424"MIME-Version : 1.0\n "
2525"Content-Type : text/plain; charset=UTF-8\n "
2626"Content-Transfer-Encoding : 8bit\n "
@@ -37,7 +37,7 @@ msgstr "作者"
3737
3838#: ../../howto/sorting.rst:6
3939msgid "Andrew Dalke and Raymond Hettinger"
40- msgstr "Andrew Dalke 和 Raymond Hettinger"
40+ msgstr "Andrew Dalke 与 Raymond Hettinger"
4141
4242#: ../../howto/sorting.rst:0
4343msgid "Release"
@@ -52,19 +52,17 @@ msgid ""
5252"Python lists have a built-in :meth:`list.sort` method that modifies the list"
5353" in-place. There is also a :func:`sorted` built-in function that builds a "
5454"new sorted list from an iterable."
55- msgstr ""
56- "Python 列表有一个内置的 :meth:`list.sort` 方法可以直接修改列表。还有一个 :func:`sorted` "
57- "内置函数,它会从一个可迭代对象构建一个新的排序列表。"
55+ msgstr "内置列表方法 :meth:`list.sort` 原地修改列表,而内置函数 :func:`sorted` 由可迭代对象建出新有序列表。"
5856
5957#: ../../howto/sorting.rst:14
6058msgid ""
6159"In this document, we explore the various techniques for sorting data using "
6260"Python."
63- msgstr "在本文档中,我们将探索使用Python对数据进行排序的各种技术 。"
61+ msgstr "在本文档中,我们将探索使用 Python 对数据进行排序的各种技术 。"
6462
6563#: ../../howto/sorting.rst:18
6664msgid "Sorting Basics"
67- msgstr "基本排序 "
65+ msgstr "排序的基础知识 "
6866
6967#: ../../howto/sorting.rst:20
7068msgid ""
@@ -79,18 +77,18 @@ msgid ""
7977"than :func:`sorted` - but if you don't need the original list, it's slightly"
8078" more efficient."
8179msgstr ""
82- "你也可以使用 :func :`list.sort` 方法,它会直接修改原列表 (并返回 ``None`` 以避免混淆),通常来说它不如 "
83- ":func:`sorted` 方便 ——— 但如果你不需要原列表,它会更有效率 。"
80+ "亦可用 :meth :`list.sort` 方法。它原地修改原列表 (并返回 ``None`` 以避免混淆)。往往不如 :func:`sorted` "
81+ "方便——但若不需原列表,用它会略高效些 。"
8482
8583#: ../../howto/sorting.rst:36
8684msgid ""
8785"Another difference is that the :meth:`list.sort` method is only defined for "
8886"lists. In contrast, the :func:`sorted` function accepts any iterable."
89- msgstr "另外一个区别是, :meth:`list.sort` 方法只是为列表定义的 ,而 :func:`sorted` 函数可以接受任何可迭代对象 。"
87+ msgstr "另一个区别是 :meth:`list.sort` 方法是只为列表定义的 ,而 :func:`sorted` 函数接受任何可迭代对象 。"
9088
9189#: ../../howto/sorting.rst:43
9290msgid "Key Functions"
93- msgstr "关键函数 "
91+ msgstr "键函数 "
9492
9593#: ../../howto/sorting.rst:45
9694msgid ""
@@ -101,7 +99,7 @@ msgstr ""
10199
102100#: ../../howto/sorting.rst:48
103101msgid "For example, here's a case-insensitive string comparison:"
104- msgstr "例如,下面是一个不区分大小写的字符串比较 :"
102+ msgstr "例如,这是个不区分大小写的字符串比较 :"
105103
106104#: ../../howto/sorting.rst:53
107105msgid ""
@@ -115,12 +113,12 @@ msgstr ""
115113msgid ""
116114"A common pattern is to sort complex objects using some of the object's "
117115"indices as keys. For example:"
118- msgstr "一种常见的模式是使用对象的一些索引作为键对复杂对象进行排序 。例如:"
116+ msgstr "常见的模式是用对象的某一些索引作为键对复杂对象排序 。例如:"
119117
120118#: ../../howto/sorting.rst:68
121119msgid ""
122120"The same technique works for objects with named attributes. For example:"
123- msgstr "同样的技术也适用于具有命名属性的对象 。例如:"
121+ msgstr "同样的方法也适用于有具名属性的对象 。例如:"
124122
125123#: ../../howto/sorting.rst:87
126124msgid "Operator Module Functions"
@@ -139,30 +137,30 @@ msgstr ""
139137
140138#: ../../howto/sorting.rst:94
141139msgid "Using those functions, the above examples become simpler and faster:"
142- msgstr "使用这些函数,上述示例变得更简单,更快捷 :"
140+ msgstr "用了那些函数之后,前面的示例变得更简单,运行起来也更快 :"
143141
144142#: ../../howto/sorting.rst:104
145143msgid ""
146144"The operator module functions allow multiple levels of sorting. For example,"
147145" to sort by *grade* then by *age*:"
148- msgstr "Operator 模块功能允许多级排序。 例如,按 *grade* 排序,然后按 *age* 排序:"
146+ msgstr "运算符模块的函数可以用来作多级排序。 例如,按 *grade* 排序,然后按 *age* 排序:"
149147
150148#: ../../howto/sorting.rst:114
151149msgid "Ascending and Descending"
152- msgstr "升序和降序 "
150+ msgstr "升序与降序 "
153151
154152#: ../../howto/sorting.rst:116
155153msgid ""
156154"Both :meth:`list.sort` and :func:`sorted` accept a *reverse* parameter with "
157155"a boolean value. This is used to flag descending sorts. For example, to get "
158156"the student data in reverse *age* order:"
159157msgstr ""
160- ":meth:`list.sort` 和 :func:`sorted` 接受布尔值的 *reverse* 参数。这用于标记降序排序。 例如,要以反向 "
161- "*age* 顺序获取学生数据 :"
158+ ":meth:`list.sort` 和 :func:`sorted` 接受布尔形参 *reverse* 用于标记降序排序。 例如,将学生数据按 *age* "
159+ " 倒序排序 :"
162160
163161#: ../../howto/sorting.rst:127
164162msgid "Sort Stability and Complex Sorts"
165- msgstr "排序稳定性和排序复杂度 "
163+ msgstr "排序稳定性与复杂排序 "
166164
167165#: ../../howto/sorting.rst:129
168166msgid ""
@@ -171,38 +169,38 @@ msgid ""
171169"that when multiple records have the same key, their original order is "
172170"preserved."
173171msgstr ""
174- "排序保证是 `稳定 <https://en.wikipedia.org/wiki/Sorting_algorithm#Stability>`_ \\ "
175- "的。 这意味着当多个记录具有相同的键值时,将保留其原始顺序 。"
172+ "排序保证 `稳定 "
173+ "<https://en.wikipedia.org/wiki/Sorting_algorithm#Stability>`_:等键记录保持原始顺序 。"
176174
177175#: ../../howto/sorting.rst:137
178176msgid ""
179177"Notice how the two records for *blue* retain their original order so that "
180178"``('blue', 1)`` is guaranteed to precede ``('blue', 2)``."
181- msgstr "注意 *blue* 的两个记录如何保留它们的原始顺序,以便 ``('blue', 1)`` 保证在 ``('blue', 2)`` 之前 。"
179+ msgstr "注意 *blue* 的两个记录是如何保序的: ``('blue', 1)`` 保证先于 ``('blue', 2)``。"
182180
183181#: ../../howto/sorting.rst:140
184182msgid ""
185183"This wonderful property lets you build complex sorts in a series of sorting "
186184"steps. For example, to sort the student data by descending *grade* and then "
187185"ascending *age*, do the *age* sort first and then sort again using *grade*:"
188186msgstr ""
189- "这个美妙的属性允许你在一系列排序步骤中构建复杂的排序 。例如,要按 *grade* 降序然后 *age* 升序对学生数据进行排序,请先 *age* "
190- "排序,然后再使用 *grade* 排序 :"
187+ "这个了不起的特性使得借助一系列排序步骤构建出复杂排序成为可能 。例如,要按 *grade* 降序后 *age* 升序排序学生数据,只需先用 *age* "
188+ "排序再用 *grade* 排序即可 :"
191189
192190#: ../../howto/sorting.rst:148
193191msgid ""
194192"This can be abstracted out into a wrapper function that can take a list and "
195193"tuples of field and order to sort them on multiple passes."
196- msgstr "这可以被抽象为一个包装函数,该函数能接受一个列表以及字段和顺序的元组,以对它们进行多重排序 。"
194+ msgstr "可抽象为包装函数,依据接收的一些字段序的元组对接收的列表做多趟排序 。"
197195
198196#: ../../howto/sorting.rst:159
199197msgid ""
200198"The `Timsort <https://en.wikipedia.org/wiki/Timsort>`_ algorithm used in "
201199"Python does multiple sorts efficiently because it can take advantage of any "
202200"ordering already present in a dataset."
203201msgstr ""
204- "Python 中使用的 `Timsort <https://en.wikipedia.org/wiki/Timsort>`_ "
205- "算法可以有效地进行多种排序,因为它可以利用数据集中已存在的任何排序 。"
202+ "Python 中曾用的 `Timsort <https://en.wikipedia.org/wiki/Timsort>`_ "
203+ "算法利用数据集中已有的任何有序性来高效进行多种排序 。"
206204
207205#: ../../howto/sorting.rst:164
208206msgid "The Old Way Using Decorate-Sort-Undecorate"
0 commit comments