Unlike most of the programming languages in python, I see boolean type to be a place holder of an integer value 1
, as the following code works perfectly.
>>> i = 0
>>> while i < 10:
... i += True
... print i
I wonder, Why would the designer of python create boolean types, when they have no explicit work which can't be done by integer, further more it behaves like an integer, and can be used as one, so other than readability is there any other significance of having a boolean in python ?