upvote
I still have a printed stack of Python 1.5.7 docs from when I first learned the language.

The addition of boolean `True` and `False` were a huge improvement to the language when they were finally added in 2.3.

I'm not sure why you're making things more complicated than they need to be. Test for truthiness. Conditional statements already evaluate boolean expressions, you're not adding anything explicit by writing `== True`.

reply
Booleans are reductionist and likely harmful, as they allow programmers to avoid thinking in terms of the test they are actually performing: is this a member of some set? If the problem is reworked like that Booleans are superfluous (this representation could be compiled to something as performant as using Booleans).

I am not sure if that perspective aligns with yours.

reply
Not sure why you're getting downvoted so much, but to put this thought into a somewhat broader context:

In an explicitly, statically typed language, bools might be useful as a standard small enum.

In what Python used to be, they weren't, not really.

But for whatever reason, declared typing is now an add-on to the language, and the people who like the verbosity of declared typing also, perhaps schizophrenically, like the terseness afforded by having a standard small enum.

reply