Comment

Veky

There's nothing to fix. bool being a subclass of int is perfectly natural, at least to everyone reading Iverson (google Iverson bracket sometime). It enables you to do all sorts of wonderful things

sum(cond for x in seq): how many x in seq satisfy cond
mystr += "\n" * keepends: add \n only if keepends is True
(falsevalue, truevalue)[condition]: easy selector
...

Parent comment

Peter Bengtsson

Good point about the backward compatibility issue. It was never going to be easy. I'll let this one slide. However it would have been nice to have that fixed for py3