Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff6dcc5

Browse files
[po] auto sync
1 parent a28192c commit ff6dcc5

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "78.00%", "updated_at": "2025-05-17T15:11:59Z"}
1+
{"translation": "78.02%", "updated_at": "2025-05-18T06:14:23Z"}

howto/sorting.po

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,15 @@ msgid ""
116116
"*key* parameter to specify a function (or other callable) to be called on "
117117
"each list element prior to making comparisons."
118118
msgstr ""
119+
":meth:`list.sort` 方法以及 :func:`sorted`, :func:`min`, :func:`max`, "
120+
":func:`heapq.nsmallest` 和 :func:`heapq.nlargest` 等函数都有一个 *key* "
121+
"形参用以指定要在进行比较之前对每个列表元素调用的函数(或其它可调用对象)。"
119122

120123
#: ../../howto/sorting.rst:56
121124
msgid ""
122125
"For example, here's a case-insensitive string comparison using "
123126
":meth:`str.casefold`:"
124-
msgstr ""
127+
msgstr "例如,下面是使用 :meth:`str.casefold` 进行不区分大小写的字符串比较:"
125128

126129
#: ../../howto/sorting.rst:59
127130
msgid ""
@@ -549,27 +552,30 @@ msgstr "不可排序类型和值的策略"
549552
msgid ""
550553
"A number of type and value issues can arise when sorting. Here are some "
551554
"strategies that can help:"
552-
msgstr ""
555+
msgstr "在排序时可能出现多种涉及类型和值的问题。 下面是一些有助于解决问题的策略:"
553556

554557
#: ../../howto/sorting.rst:284
555558
msgid "Convert non-comparable input types to strings prior to sorting:"
556-
msgstr ""
559+
msgstr "在排序之前将不可比较的输入类型转换为字符串。"
557560

558561
#: ../../howto/sorting.rst:286
559562
msgid ""
560563
">>> data = ['twelve', '11', 10]\n"
561564
">>> sorted(map(str, data))\n"
562565
"['10', '11', 'twelve']"
563566
msgstr ""
567+
">>> data = ['twelve', '11', 10]\n"
568+
">>> sorted(map(str, data))\n"
569+
"['10', '11', 'twelve']"
564570

565571
#: ../../howto/sorting.rst:292
566572
msgid ""
567573
"This is needed because most cross-type comparisons raise a :exc:`TypeError`."
568-
msgstr ""
574+
msgstr "需要这样做是因为大多数跨类型比较都会引发 :exc:`TypeError`。"
569575

570576
#: ../../howto/sorting.rst:295
571577
msgid "Remove special values prior to sorting:"
572-
msgstr ""
578+
msgstr "在排序之前移除特殊的值:"
573579

574580
#: ../../howto/sorting.rst:297
575581
msgid ""
@@ -579,6 +585,11 @@ msgid ""
579585
">>> sorted(filterfalse(isnan, data))\n"
580586
"[1.1, 2.2, 3.3]"
581587
msgstr ""
588+
">>> from math import isnan\n"
589+
">>> from itertools import filterfalse\n"
590+
">>> data = [3.3, float('nan'), 1.1, 2.2]\n"
591+
">>> sorted(filterfalse(isnan, data))\n"
592+
"[1.1, 2.2, 3.3]"
582593

583594
#: ../../howto/sorting.rst:305
584595
msgid ""

0 commit comments

Comments
 (0)