[Python-ideas] XOR

Sturla Molden sturla at molden.no
Tue Oct 27 23:46:47 CET 2009

Sturla Molden skrev:
> Why does Python have a bitwise but not a logical xor operator? It's 
> even weirder because boolean objects do have a __xor__ method.
 >>> True.__xor__(False)
 >>> True xor False
SyntaxError: invalid syntax

Doesn't this look like a case for new syntax before the moratorium?


More information about the Python-ideas mailing list