3 ms·
No, that's because (for historical reasons of booleans having only been added in Python 2.3[0]) >>> issubclass(bool, int) True >>> True == 1 Tr
by masklinn 9y ago
No, that's because (for historical reasons of booleans having only been added in Python 2.3[0])
>>> issubclass(bool, int)
True
>>> True == 1
True
>>> False == 0
True
[0] https://www.python.org/dev/peps/pep-0285/ https://www.python.org/dev/peps/pep-0285/