Open CodyKochmann opened 7 years ago
FYI booleans are integer in python :
Python 2.7.6 (default, Oct 26 2016, 20:30:19)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> isinstance(True, int)
True
>>> False == 0
True
>>> True == 1
True
So I dont think much can be done here...
Would it be crazy to say if booleans specifically are being specified this would be used for the test instead?
type(True) == bool
Its a little less flexible but being that design by contract is a little more strict than the general python, I feel like its appropriate.
This small example should be all that is needed to explain the problem.