1
1
# SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) 2001-2021 , Python Software Foundation
2
+ # Copyright (C) 2001-2024 , Python Software Foundation
3
3
# This file is distributed under the same license as the Python package.
4
4
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
#
6
6
# Translators:
7
7
# Shengjing Zhu <[email protected] >, 2020
8
8
# ww song <[email protected] >, 2020
9
9
# df2dc1c92e792f7ae8417c51df43db8f_594d92a <0f49be28017426edb1db1a2ab6e67088_717605>, 2020
10
- # Freesand Leo <[email protected] >, 2020
11
10
# Alpha Du <[email protected] >, 2020
12
11
# Aloxaf <[email protected] >, 2020
13
- # Siyuan Xu, 2020
12
+ # Xu Siyuan, 2020
13
+ # Rafael Fontenelle <[email protected] >, 2024
14
14
#
15
15
#, fuzzy
16
16
msgid ""
17
17
msgstr ""
18
18
"Project-Id-Version : Python 3.8\n "
19
19
"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 "
21
21
"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 "
24
24
"MIME-Version : 1.0\n "
25
25
"Content-Type : text/plain; charset=UTF-8\n "
26
26
"Content-Transfer-Encoding : 8bit\n "
@@ -37,7 +37,7 @@ msgstr "作者"
37
37
38
38
#: ../../howto/sorting.rst:6
39
39
msgid "Andrew Dalke and Raymond Hettinger"
40
- msgstr "Andrew Dalke 和 Raymond Hettinger"
40
+ msgstr "Andrew Dalke 与 Raymond Hettinger"
41
41
42
42
#: ../../howto/sorting.rst:0
43
43
msgid "Release"
@@ -52,19 +52,17 @@ msgid ""
52
52
"Python lists have a built-in :meth:`list.sort` method that modifies the list"
53
53
" in-place. There is also a :func:`sorted` built-in function that builds a "
54
54
"new sorted list from an iterable."
55
- msgstr ""
56
- "Python 列表有一个内置的 :meth:`list.sort` 方法可以直接修改列表。还有一个 :func:`sorted` "
57
- "内置函数,它会从一个可迭代对象构建一个新的排序列表。"
55
+ msgstr "内置列表方法 :meth:`list.sort` 原地修改列表,而内置函数 :func:`sorted` 由可迭代对象建出新有序列表。"
58
56
59
57
#: ../../howto/sorting.rst:14
60
58
msgid ""
61
59
"In this document, we explore the various techniques for sorting data using "
62
60
"Python."
63
- msgstr "在本文档中,我们将探索使用Python对数据进行排序的各种技术 。"
61
+ msgstr "在本文档中,我们将探索使用 Python 对数据进行排序的各种技术 。"
64
62
65
63
#: ../../howto/sorting.rst:18
66
64
msgid "Sorting Basics"
67
- msgstr "基本排序 "
65
+ msgstr "排序的基础知识 "
68
66
69
67
#: ../../howto/sorting.rst:20
70
68
msgid ""
@@ -79,18 +77,18 @@ msgid ""
79
77
"than :func:`sorted` - but if you don't need the original list, it's slightly"
80
78
" more efficient."
81
79
msgstr ""
82
- "你也可以使用 :func :`list.sort` 方法,它会直接修改原列表 (并返回 ``None`` 以避免混淆),通常来说它不如 "
83
- ":func:`sorted` 方便 ——— 但如果你不需要原列表,它会更有效率 。"
80
+ "亦可用 :meth :`list.sort` 方法。它原地修改原列表 (并返回 ``None`` 以避免混淆)。往往不如 :func:`sorted` "
81
+ "方便——但若不需原列表,用它会略高效些 。"
84
82
85
83
#: ../../howto/sorting.rst:36
86
84
msgid ""
87
85
"Another difference is that the :meth:`list.sort` method is only defined for "
88
86
"lists. In contrast, the :func:`sorted` function accepts any iterable."
89
- msgstr "另外一个区别是, :meth:`list.sort` 方法只是为列表定义的 ,而 :func:`sorted` 函数可以接受任何可迭代对象 。"
87
+ msgstr "另一个区别是 :meth:`list.sort` 方法是只为列表定义的 ,而 :func:`sorted` 函数接受任何可迭代对象 。"
90
88
91
89
#: ../../howto/sorting.rst:43
92
90
msgid "Key Functions"
93
- msgstr "关键函数 "
91
+ msgstr "键函数 "
94
92
95
93
#: ../../howto/sorting.rst:45
96
94
msgid ""
@@ -101,7 +99,7 @@ msgstr ""
101
99
102
100
#: ../../howto/sorting.rst:48
103
101
msgid "For example, here's a case-insensitive string comparison:"
104
- msgstr "例如,下面是一个不区分大小写的字符串比较 :"
102
+ msgstr "例如,这是个不区分大小写的字符串比较 :"
105
103
106
104
#: ../../howto/sorting.rst:53
107
105
msgid ""
@@ -115,12 +113,12 @@ msgstr ""
115
113
msgid ""
116
114
"A common pattern is to sort complex objects using some of the object's "
117
115
"indices as keys. For example:"
118
- msgstr "一种常见的模式是使用对象的一些索引作为键对复杂对象进行排序 。例如:"
116
+ msgstr "常见的模式是用对象的某一些索引作为键对复杂对象排序 。例如:"
119
117
120
118
#: ../../howto/sorting.rst:68
121
119
msgid ""
122
120
"The same technique works for objects with named attributes. For example:"
123
- msgstr "同样的技术也适用于具有命名属性的对象 。例如:"
121
+ msgstr "同样的方法也适用于有具名属性的对象 。例如:"
124
122
125
123
#: ../../howto/sorting.rst:87
126
124
msgid "Operator Module Functions"
@@ -139,30 +137,30 @@ msgstr ""
139
137
140
138
#: ../../howto/sorting.rst:94
141
139
msgid "Using those functions, the above examples become simpler and faster:"
142
- msgstr "使用这些函数,上述示例变得更简单,更快捷 :"
140
+ msgstr "用了那些函数之后,前面的示例变得更简单,运行起来也更快 :"
143
141
144
142
#: ../../howto/sorting.rst:104
145
143
msgid ""
146
144
"The operator module functions allow multiple levels of sorting. For example,"
147
145
" to sort by *grade* then by *age*:"
148
- msgstr "Operator 模块功能允许多级排序。 例如,按 *grade* 排序,然后按 *age* 排序:"
146
+ msgstr "运算符模块的函数可以用来作多级排序。 例如,按 *grade* 排序,然后按 *age* 排序:"
149
147
150
148
#: ../../howto/sorting.rst:114
151
149
msgid "Ascending and Descending"
152
- msgstr "升序和降序 "
150
+ msgstr "升序与降序 "
153
151
154
152
#: ../../howto/sorting.rst:116
155
153
msgid ""
156
154
"Both :meth:`list.sort` and :func:`sorted` accept a *reverse* parameter with "
157
155
"a boolean value. This is used to flag descending sorts. For example, to get "
158
156
"the student data in reverse *age* order:"
159
157
msgstr ""
160
- ":meth:`list.sort` 和 :func:`sorted` 接受布尔值的 *reverse* 参数。这用于标记降序排序。 例如,要以反向 "
161
- "*age* 顺序获取学生数据 :"
158
+ ":meth:`list.sort` 和 :func:`sorted` 接受布尔形参 *reverse* 用于标记降序排序。 例如,将学生数据按 *age* "
159
+ " 倒序排序 :"
162
160
163
161
#: ../../howto/sorting.rst:127
164
162
msgid "Sort Stability and Complex Sorts"
165
- msgstr "排序稳定性和排序复杂度 "
163
+ msgstr "排序稳定性与复杂排序 "
166
164
167
165
#: ../../howto/sorting.rst:129
168
166
msgid ""
@@ -171,38 +169,38 @@ msgid ""
171
169
"that when multiple records have the same key, their original order is "
172
170
"preserved."
173
171
msgstr ""
174
- "排序保证是 `稳定 <https://en.wikipedia.org/wiki/Sorting_algorithm#Stability>`_ \\ "
175
- "的。 这意味着当多个记录具有相同的键值时,将保留其原始顺序 。"
172
+ "排序保证 `稳定 "
173
+ "<https://en.wikipedia.org/wiki/Sorting_algorithm#Stability>`_:等键记录保持原始顺序 。"
176
174
177
175
#: ../../howto/sorting.rst:137
178
176
msgid ""
179
177
"Notice how the two records for *blue* retain their original order so that "
180
178
"``('blue', 1)`` is guaranteed to precede ``('blue', 2)``."
181
- msgstr "注意 *blue* 的两个记录如何保留它们的原始顺序,以便 ``('blue', 1)`` 保证在 ``('blue', 2)`` 之前 。"
179
+ msgstr "注意 *blue* 的两个记录是如何保序的: ``('blue', 1)`` 保证先于 ``('blue', 2)``。"
182
180
183
181
#: ../../howto/sorting.rst:140
184
182
msgid ""
185
183
"This wonderful property lets you build complex sorts in a series of sorting "
186
184
"steps. For example, to sort the student data by descending *grade* and then "
187
185
"ascending *age*, do the *age* sort first and then sort again using *grade*:"
188
186
msgstr ""
189
- "这个美妙的属性允许你在一系列排序步骤中构建复杂的排序 。例如,要按 *grade* 降序然后 *age* 升序对学生数据进行排序,请先 *age* "
190
- "排序,然后再使用 *grade* 排序 :"
187
+ "这个了不起的特性使得借助一系列排序步骤构建出复杂排序成为可能 。例如,要按 *grade* 降序后 *age* 升序排序学生数据,只需先用 *age* "
188
+ "排序再用 *grade* 排序即可 :"
191
189
192
190
#: ../../howto/sorting.rst:148
193
191
msgid ""
194
192
"This can be abstracted out into a wrapper function that can take a list and "
195
193
"tuples of field and order to sort them on multiple passes."
196
- msgstr "这可以被抽象为一个包装函数,该函数能接受一个列表以及字段和顺序的元组,以对它们进行多重排序 。"
194
+ msgstr "可抽象为包装函数,依据接收的一些字段序的元组对接收的列表做多趟排序 。"
197
195
198
196
#: ../../howto/sorting.rst:159
199
197
msgid ""
200
198
"The `Timsort <https://en.wikipedia.org/wiki/Timsort>`_ algorithm used in "
201
199
"Python does multiple sorts efficiently because it can take advantage of any "
202
200
"ordering already present in a dataset."
203
201
msgstr ""
204
- "Python 中使用的 `Timsort <https://en.wikipedia.org/wiki/Timsort>`_ "
205
- "算法可以有效地进行多种排序,因为它可以利用数据集中已存在的任何排序 。"
202
+ "Python 中曾用的 `Timsort <https://en.wikipedia.org/wiki/Timsort>`_ "
203
+ "算法利用数据集中已有的任何有序性来高效进行多种排序 。"
206
204
207
205
#: ../../howto/sorting.rst:164
208
206
msgid "The Old Way Using Decorate-Sort-Undecorate"
0 commit comments