Re:In Memoriam: Tim Peters 1952–2026
by pdonis on Thursday November 12, 2026 @10:17PM
(#50477736)
> If we had stuck with 0 and 1, we would have avoided all this confusion.
I don't see how. Indeed, using 0 and 1, the int values, as if they were boolean false and true created more confusion. First, int has more values than just 0 and 1--and all of them are "truthy". Second, treating 0 and 1 as booleans is still treating boolean-ness as a noun--but also confusing that with treating it as an adjective for those int values.
PEP 285, which introduced the bool type, gives other rationales as well:
I don't see how. Indeed, using 0 and 1, the int values, as if they were boolean false and true created more confusion. First, int has more values than just 0 and 1--and all of them are "truthy". Second, treating 0 and 1 as booleans is still treating boolean-ness as a noun--but also confusing that with treating it as an adjective for those int values.
PEP 285, which introduced the bool type, gives other rationales as well:
https://peps.python.org/pep-0285/