@@ -15,7 +15,7 @@ msgid ""
1515msgstr ""
1616"Project-Id-Version : Python 3.9\n "
1717"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 "
1919"PO-Revision-Date : 2017-02-16 23:43+0000\n "
2020"
Last-Translator :
Freesand Leo <[email protected] >, 2024\n "
2121"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -184,6 +184,9 @@ msgid ""
184184":func:`itertools.zip_longest`, e.g. ``map(func, *sequences)`` becomes "
185185"``list(map(func, itertools.zip_longest(*sequences)))``."
186186msgstr ""
187+ "如果输入序列的长度不相等,:func:`map` 将在最短序列的终点停止。 为了与 Python 2.x 中的 :func:`map` "
188+ "完全兼容,也可将序列包装在 :func:`itertools.zip_longest` 中,例如将 ``map(func, *sequences)`` "
189+ "变成 ``list(map(func, itertools.zip_longest(*sequences)))``。"
187190
188191#: ../../whatsnew/3.0.rst:173
189192msgid ""
@@ -216,13 +219,19 @@ msgid ""
216219"objects of different incomparable types always compare unequal to each "
217220"other."
218221msgstr ""
222+ "当操作数不存在有意义的自然排序时,排序比较操作符 (``<``, ``<=``, ``>=``, ``>``) 会引发 TypeError 异常。 "
223+ "因此,像 ``1 < ''``, ``0 > None`` 或 ``len <= len`` 这样的表达式不再有效,例如 ``None < None``"
224+ " 会引发 :exc:`TypeError` 而不是返回 ``False``。 由此推论,对异构列表进行排序不再有意义 —— 所有元素必须相互可比。 "
225+ "请注意,这不适用于 ``==`` 和 ``!=`` 操作符:不同的不可比类型的对象总是互不相等的。"
219226
220227#: ../../whatsnew/3.0.rst:195
221228msgid ""
222229":meth:`builtin.sorted` and :meth:`list.sort` no longer accept the *cmp* "
223230"argument providing a comparison function. Use the *key* argument instead. "
224231"N.B. the *key* and *reverse* arguments are now \" keyword-only\" ."
225232msgstr ""
233+ ":meth:`builtin.sorted` 和 :meth:`list.sort` 不再接受提供比较函数的 *cmp* 参数。 请使用 *key* "
234+ "参数。 注意 *key* 和 *reverse* 参数现在是“仅限关键字”参数。 "
226235
227236#: ../../whatsnew/3.0.rst:200
228237msgid ""
@@ -232,6 +241,9 @@ msgid ""
232241"(If you really need the :func:`cmp` functionality, you could use the "
233242"expression ``(a > b) - (a < b)`` as the equivalent for ``cmp(a, b)``.)"
234243msgstr ""
244+ ":func:`cmp` 函数应视为已不复存在,而 :meth:`__cmp__` 特殊方法也不再支持。 请使用 :meth:`__lt__` "
245+ "进行排序,使用 :meth:`__eq__` 与 :meth:`__hash__` 进行比较,并根据需要使用其他的丰富比较方法。 (如果确实需要 "
246+ ":func:`cmp` 功能,可以使用表达式 ``(a > b) - (a < b)`` 以实现 ``cmp(a, b)``。)"
235247
236248#: ../../whatsnew/3.0.rst:207
237249msgid "Integers"
@@ -243,6 +255,8 @@ msgid ""
243255"there is only one built-in integral type, named :class:`int`; but it behaves"
244256" mostly like the old :class:`long` type."
245257msgstr ""
258+ ":pep:`237`: 在实质上,:class:`long` 已被重命名为 :class:`int`。 也就是说,现在只有一种内置整数类型,叫做 "
259+ ":class:`int`;但其行为更像是旧的 :class:`long` 类型。"
246260
247261#: ../../whatsnew/3.0.rst:213
248262msgid ""
0 commit comments