Discussion:
[Python-3000-checkins] r67331 - python/branches/py3k/Doc/whatsnew/3.0.rst
georg.brandl
2008-11-22 08:35:59 UTC
Permalink
Author: georg.brandl
Date: Sat Nov 22 09:35:59 2008
New Revision: 67331

Log:
#4372: add bullet point for __cmp__ removal.


Modified:
python/branches/py3k/Doc/whatsnew/3.0.rst

Modified: python/branches/py3k/Doc/whatsnew/3.0.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.0.rst (original)
+++ python/branches/py3k/Doc/whatsnew/3.0.rst Sat Nov 22 09:35:59 2008
@@ -160,6 +160,10 @@
argument providing a comparison function. Use the *key* argument
instead. N.B. the *key* and *reverse* arguments are now "keyword-only".

+* 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.
+
* ``1/2`` returns a float. Use ``1//2`` to get the truncating behavior.

.. XXX move the next one to a later point, it's not a common stumbling block.
Loading...