
Oct. 27, 2009
11:03 p.m.
On Tue, Oct 27, 2009 at 4:46 PM, Sturla Molden <sturla@molden.no> wrote:
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 True xor False SyntaxError: invalid syntax
Doesn't this look like a case for new syntax before the moratorium?
No the proper syntax is
False ^ False False False ^ True True True ^ False True True ^ True False