From: Kurt B. Kaiser Date: Wed, 13 Feb 2008 16:09:27 +0000 (+0000) Subject: list.sort() and builtin.sorted() no longer accept 'cmp' argument. X-Git-Tag: v3.0a3~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1401012166fa66ccc2f8c107730c6f71b0c9f75;p=python list.sort() and builtin.sorted() no longer accept 'cmp' argument. --- diff --git a/Doc/whatsnew/3.0.rst b/Doc/whatsnew/3.0.rst index c9416db398..ace0199bca 100644 --- a/Doc/whatsnew/3.0.rst +++ b/Doc/whatsnew/3.0.rst @@ -141,6 +141,10 @@ changes to rarely used features.) :meth:`dict.values` return views instead of lists. For example, this no longer works: ``k = d.keys(); k.sort()``. Use ``k = sorted(d)`` instead. +* :meth:`builtin.sorted` and :meth:`list.sort` no longer accept the `cmp` + argument providing a comparision function. Use the `key` argument + instead. N.B. the `key` and `reverse` arguments are now "keyword-only". + * ``1/2`` returns a float. Use ``1//2`` to get the truncating behavior. * The :func:`repr` of a long integer doesn't include the trailing ``L``