Re: class semantics

Guido.van.Rossum@cwi.nl
Sat, 04 Feb 1995 12:28:20 +0100

> There seems to be no way to overload comparison operators,
> except for "<instance> <op> <instance>" cases. I can't
> compare an instance and a true number, the way I can mix
> instances and numbers for add, subtract, etc., even if I've
> defined a __cmp__ method:

This will have been fixed in 1.2. It was indeed a bug in some
previous releases (before that it actually worked but there were other
problems such as that you couldn't *not* have a coercion method).

--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>