[New-bugs-announce] [issue4372] __cmp__ removal not in What's New

Terry J. Reedy report at bugs.python.org
Thu Nov 20 23:48:47 CET 2008


New submission from Terry J. Reedy <tjreedy at udel.edu>:

What's New in Python 3.0/Common stumbling blocks
has this "builtin.sorted() and list.sort() no longer accept the cmp
argument providing a comparison function. Use the key argument instead."

Please add "The __cmp__ special method is no longer used for
comparisons. Use __lt__ for sorting, __eq__ with __hash__, and other
rich comparisons as needed."

People are already stumbling on this.

----------
assignee: georg.brandl
components: Documentation
messages: 76147
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: __cmp__ removal not in What's New
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4372>
_______________________________________


More information about the New-bugs-announce mailing list