On 2018-11-16, Steve Keller <keller@no.invalid> wrote:
> Why do the integers 0 and 1 compare equal to the boolean values False
> and True and all other integers to neither of them?

Because Python used not to have a boolean type and used the integers
0 and 1 instead, so when the boolean type was introduced True and
False were made to behave very much like 1 and 0 for backwards
compatibility reasons.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to