[Python-Dev] Boolean transition (original) (raw)

David Abrahams David Abrahams" <david.abrahams@rcn.com
Sun, 10 Mar 2002 20:07:38 -0500


----- Original Message ----- From: "Paul Prescod" <paul@prescod.net>

Let's take this logic a little further. If you're arguing that booleans should be subtypes of integers because integers can be used in a boolean context then I guess booleans should ALSO be subtypes of strings and lists because strings and lists can also be used in a boolean fashion.

Using an integer as a boolean is common. I do it almost every day I program in languages with both types. Using a boolean as an integer is not common in my programming (though Tim's may be different). Where it crops up in my programming it is probably an error where I passed the parameters to the function in the wrong order.

+1!