Mark Dickinson <dicki...@gmail.com> added the comment:
[Raymond] > Given that & | and ^ are closed under bools [...] So maybe the right fix is to change that fact? I'm not sure what the value of having True & True return True rather than 1 is, beyond misleading people into thinking that bitwise operators "just work" as logical operators on bools. Having True & True give 1 would send a clearer message that "yes, this works, but only because of the bool-is-an-int relationship, and it's not the right way to do logical operations". Does anyone know what the rationale was for having & and | on bools return bools in the first place? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37831> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com