On 5 Jun 2016 11:38, "Giampaolo Rodola'"
On the other hand (and I'm gonna contradict myself with what I've just
said above) on chapter 4:
There's a small but vocal minority that would prefer to see "textbook" bools that don't support arithmetic operations at all, but most reviewers agree with me that bools should always allow arithmetic operations.
...so maybe supporting arithmetical operations was also a primary
intention, in which case my question is "why?". The inheritance from int meant the default behaviour was to support type-promoting integer arithmetic operations in addition to bitwise arithmetic. That changes the question from "Why support that?" to "Why do the extra design, documentation and implementation work needed to prevent that?". The fact that "1 + True == 2" is surprising hasn't proven to be enough to motivate anyone to define the precise subset of operations they want to prevent, and then make the case for those restrictions as Python's native behaviour. Cheers, Nick.