Re:Understanding Python through its builtins
by wizzwizz4 on Sunday October 10, 2021 @06:42PM
(#28822646)
The “complex > real > int” thing is true in mathematics. In Python, `bool` inherits from `int`.
[ Parent
| on HN ]
Yeah, 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.