Why Python Can Add Booleans

In Python, `bool` is a small, specialized type built on top of `int`. Its only values, `True` and `False`, behave numerically as 1 and 0, respectively. Because addition uses those underlying numeric values, adding two `True` values produces the same result as adding 1 and 1.

This relationship also means a Boolean can appear in other integer contexts, such as multiplication or a calculation. It does not mean that `True` and the integer `1` are the same object or the same type: `type(True)` is `bool`, and `bool` is a subclass of `int`.

When the Behavior Is Useful—and When It Misleads

The numeric connection is handy for counting conditions. For example, adding `condition_a + condition_b` gives the number of conditions that are true, without writing a separate counter. Python programmers often use this idea to count matching items in a collection.

But the same convenience can obscure intent. If a calculation is supposed to use only ordinary numbers, a Boolean value can slip in and quietly contribute 0 or 1 rather than causing an error. The practical lesson is to treat Boolean arithmetic as a deliberate shortcut—not as evidence that truth values and quantities are interchangeable.