|
|
|
|
|
by pdonis
23 days ago
|
|
> 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: https://peps.python.org/pep-0285/ |
|