[Python-ideas] Changing the meaning of bool.__invert__

Random832 random832 at fastmail.com
Sat Apr 9 12:23:55 EDT 2016

On Sat, Apr 9, 2016, at 11:43, Steven D'Aprano wrote:
> flag ^ flag is useful since we don't have a boolean-xor operator and 
> bitwise-xor does the right thing for bools.

If you have bools, so does !=. If you don't, ^ is no better.

More information about the Python-ideas mailing list