# Is there a road towards making bool a fully-fledged Boolean type?

**URL:** <https://discuss.python.org/t/is-there-a-road-towards-making-bool-a-fully-fledged-boolean-type/62392>\
**Category:** Ideas\
**Created:** [August 30, 2024, 7:50am UTC](https://discuss.python.org/t/is-there-a-road-towards-making-bool-a-fully-fledged-boolean-type/62392 "2024-08-30T07:50:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![NeilGirdhar](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/neilgirdhar/32/5776_2.png) [@NeilGirdhar](https://discuss.python.org/u/NeilGirdhar)\
**Post date:** [August 30, 2024, 7:50am UTC](https://discuss.python.org/t/is-there-a-road-towards-making-bool-a-fully-fledged-boolean-type/62392/1 "2024-08-30T07:50:39Z")

</div>

This has been something I’ve wanted for a long time and seeing all the support on Paul’s suggestion [here](https://discuss.python.org/t/bool-deprecation/62232/5), I was wondering if there is any possibility towards making progress towards making `bool` a non-integer in the long run.

In particular, are any of these feasible in the short or long run?

- making `bool` incompatible with other arithmetic operations like `+,-,*,/,%,|,&,^`
- making `int` not imply `int | bool` in type annotations
- making `bool` not be a subclass of either `int` nor `numbers.Integral`
- any others?

The argument for such a change would be that these arithmetic operations:

- do not coincide with how numerical libraries treat Boolean values, (e.g., `True + True == 2`, but the Array API will treat this as _or_),
- exhibit some footguns (e.g., `True & 4 == 0` whereas `True and 4 == 4`),
- are rarely used,
- and their old behaviour can easily be recovered with an explicit cast to `int`.

Also, the smaller the `bool` interface, the more effective static type checkers are at discovering logical errors (for example, a Boolean flag that leaked into an arithmetic operations by accident).

I realize this is far smaller priority than the `~bool` deprecation and more disruptive. I’m more curious about how this balances out.

---

_[View the full topic](https://discuss.python.org/t/is-there-a-road-towards-making-bool-a-fully-fledged-boolean-type/62392)._
