Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b667087

Browse files
committed
#4372: add bullet point for __cmp__ removal.
1 parent 5076740 commit b667087

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Doc/whatsnew/3.0.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ changes to rarely used features.)
160160
argument providing a comparison function. Use the *key* argument
161161
instead. N.B. the *key* and *reverse* arguments are now "keyword-only".
162162

163+
* The :meth:`__cmp__` special method is no longer supported. Use :meth:`__lt__`
164+
for sorting, :meth:`__eq__` with :meth:`__hash__`, and other rich comparisons
165+
as needed.
166+
163167
* ``1/2`` returns a float. Use ``1//2`` to get the truncating behavior.
164168

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

0 commit comments

Comments
 (0)