2 ms·
The “complex > real > int” thing is true in mathematics. In Python, `bool` inherits from `int`.
by wizzwizz4 5y ago
The “complex > real > int” thing is true in mathematics. In Python, `bool` inherits from `int`.
- kgm 5y agoYeah, but we're not talking about pure mathematics. We're talking about floats, and I find that it's very important to be clear about the limitations. It's easy to get some nasty bugs if you start assuming that you can cram just any int into a float. And I have no objections to the article's description of the bool type.