# ~bool deprecation

**URL:** <https://discuss.python.org/t/bool-deprecation/62232>\
**Category:** Core Development\
**Created:** [August 28, 2024, 6:49pm UTC](https://discuss.python.org/t/bool-deprecation/62232 "2024-08-28T18:49:37Z")\
**Posts on this page:** 1\
**Showing post:** 81

<div class="post-metadata">

**Author:** ![hwelch](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/hwelch/32/33920_2.png) [@hwelch](https://discuss.python.org/u/hwelch)\
**Post date:** [February 15, 2026, 4:07am UTC](https://discuss.python.org/t/bool-deprecation/62232/81 "2026-02-15T04:07:21Z")

</div>

> [@tim.one](#):
>
> bool is a subclass of int in Python, period.

I would say, beyond that, bool is specifically the ints 0 and 1 too. I’ve used that many times to hack string formatters by multiplying the string by a bool. Since it’s totally valid to multiply a string by 0 to mask it out.

Another reasonable example of something I’ve done before that relies on bool being 1/0:

```python
models: list[Model]

errors = len(models) - sum(m.valid() for m in models)

```

Which would fail if bool wasn’t 1 and 0

---

_[View the full topic](https://discuss.python.org/t/bool-deprecation/62232)._
