]> granicus.if.org Git - python/commitdiff
cmp() is not really gone.
authorGeorg Brandl <georg@python.org>
Sat, 6 Dec 2008 08:14:46 +0000 (08:14 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 6 Dec 2008 08:14:46 +0000 (08:14 +0000)
Doc/whatsnew/3.0.rst

index 68e8c5a65e747880ba3c73c4e11ff6bb6d8b85cc..f2d9362039817f5bdd0c160073379b4714258eb6 100644 (file)
@@ -189,12 +189,11 @@ Python 3.0 has simplified the rules for ordering comparisons:
   argument instead. N.B. the *key* and *reverse* arguments are now
   "keyword-only".
 
-* The :func:`cmp` function is gone, and the :meth:`__cmp__` special
-  method is no longer supported.  Use :meth:`__lt__` for sorting,
-  :meth:`__eq__` with :meth:`__hash__`, and other rich comparisons as
-  needed.  (If you really need the :func:`cmp` functionality, you
-  could use the expression ``(a > b) - (a < b)`` as the equivalent for
-  ``cmp(a, b)``.)
+* The :func:`cmp` function should be treated as gone, and the :meth:`__cmp__`
+  special method is no longer supported.  Use :meth:`__lt__` for sorting,
+  :meth:`__eq__` with :meth:`__hash__`, and other rich comparisons as needed.
+  (If you really need the :func:`cmp` functionality, you could use the
+  expression ``(a > b) - (a < b)`` as the equivalent for ``cmp(a, b)``.)
 
 Integers
 --------