@@ -15,7 +15,7 @@ msgid ""
15
15
msgstr ""
16
16
"Project-Id-Version : Python 3.9\n "
17
17
"Report-Msgid-Bugs-To : \n "
18
- "POT-Creation-Date : 2024-07-05 16:34 +0000\n "
18
+ "POT-Creation-Date : 2024-07-12 16:21 +0000\n "
19
19
"PO-Revision-Date : 2017-02-16 23:43+0000\n "
20
20
"Last-Translator : Freesand Leo <yuqinju@163.com>, 2024\n "
21
21
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -184,6 +184,9 @@ msgid ""
184
184
":func:`itertools.zip_longest`, e.g. ``map(func, *sequences)`` becomes "
185
185
"``list(map(func, itertools.zip_longest(*sequences)))``."
186
186
msgstr ""
187
+ "如果输入序列的长度不相等,:func:`map` 将在最短序列的终点停止。 为了与 Python 2.x 中的 :func:`map` "
188
+ "完全兼容,也可将序列包装在 :func:`itertools.zip_longest` 中,例如将 ``map(func, *sequences)`` "
189
+ "变成 ``list(map(func, itertools.zip_longest(*sequences)))``。"
187
190
188
191
#: ../../whatsnew/3.0.rst:173
189
192
msgid ""
@@ -216,13 +219,19 @@ msgid ""
216
219
"objects of different incomparable types always compare unequal to each "
217
220
"other."
218
221
msgstr ""
222
+ "当操作数不存在有意义的自然排序时,排序比较操作符 (``<``, ``<=``, ``>=``, ``>``) 会引发 TypeError 异常。 "
223
+ "因此,像 ``1 < ''``, ``0 > None`` 或 ``len <= len`` 这样的表达式不再有效,例如 ``None < None``"
224
+ " 会引发 :exc:`TypeError` 而不是返回 ``False``。 由此推论,对异构列表进行排序不再有意义 —— 所有元素必须相互可比。 "
225
+ "请注意,这不适用于 ``==`` 和 ``!=`` 操作符:不同的不可比类型的对象总是互不相等的。"
219
226
220
227
#: ../../whatsnew/3.0.rst:195
221
228
msgid ""
222
229
":meth:`builtin.sorted` and :meth:`list.sort` no longer accept the *cmp* "
223
230
"argument providing a comparison function. Use the *key* argument instead. "
224
231
"N.B. the *key* and *reverse* arguments are now \" keyword-only\" ."
225
232
msgstr ""
233
+ ":meth:`builtin.sorted` 和 :meth:`list.sort` 不再接受提供比较函数的 *cmp* 参数。 请使用 *key* "
234
+ "参数。 注意 *key* 和 *reverse* 参数现在是“仅限关键字”参数。 "
226
235
227
236
#: ../../whatsnew/3.0.rst:200
228
237
msgid ""
@@ -232,6 +241,9 @@ msgid ""
232
241
"(If you really need the :func:`cmp` functionality, you could use the "
233
242
"expression ``(a > b) - (a < b)`` as the equivalent for ``cmp(a, b)``.)"
234
243
msgstr ""
244
+ ":func:`cmp` 函数应视为已不复存在,而 :meth:`__cmp__` 特殊方法也不再支持。 请使用 :meth:`__lt__` "
245
+ "进行排序,使用 :meth:`__eq__` 与 :meth:`__hash__` 进行比较,并根据需要使用其他的丰富比较方法。 (如果确实需要 "
246
+ ":func:`cmp` 功能,可以使用表达式 ``(a > b) - (a < b)`` 以实现 ``cmp(a, b)``。)"
235
247
236
248
#: ../../whatsnew/3.0.rst:207
237
249
msgid "Integers"
@@ -243,6 +255,8 @@ msgid ""
243
255
"there is only one built-in integral type, named :class:`int`; but it behaves"
244
256
" mostly like the old :class:`long` type."
245
257
msgstr ""
258
+ ":pep:`237`: 在实质上,:class:`long` 已被重命名为 :class:`int`。 也就是说,现在只有一种内置整数类型,叫做 "
259
+ ":class:`int`;但其行为更像是旧的 :class:`long` 类型。"
246
260
247
261
#: ../../whatsnew/3.0.rst:213
248
262
msgid ""
0 commit comments