[Python-3000] Is __cmp__ deprecated?

Guido van Rossum guido at python.org
Thu Aug 23 17:43:52 CEST 2007


Coerce is definitely dead.

cmp() is still alive and __cmp__ is used to overload it; on the one
hand I'd like to get rid of it but OTOH it's occasionally useful. So
it'll probably stay. However, to overload <, == etc. you *have* to
overload __lt__ and friends.

On 8/23/07, Paul Moore <p.f.moore at gmail.com> wrote:
> Can I just check - is __cmp__ due for removal in Py3K? There's no
> mention of it in PEP 3100, but its status seems unclear from
> references I've found.
>
> Actually, is __coerce__ still around, as well? Again, I can't see a
> clear answer in the PEPs or list discussions.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list