[Python-Dev] PEP 285: Adding a bool type

David Abrahams david.abrahams at rcn.com
Sat Mar 30 11:11:29 EST 2002


----- Original Message -----
From: "Andrew Koenig" <ark at research.att.com>
> Liskov substitutibility would seem to suggest deriving int from bool,
> not the other way around.  That is: If I have a program that uses bool
> values, I can change it so that it uses int values without affecting
> the behavior of the program.  The reverse is not true.

Even that won't work, because of the different repr/str behavior... one
reason I don't like the inheritance relationship.

> I wonder if this is the circle-ellipse problem over again?

square-rectangle-ly y'rs,
dave





More information about the Python-list mailing list