[Python-ideas] XOR

Chris Rebert pyideas at rebertia.com
Tue Oct 27 23:48:53 CET 2009

On Tue, Oct 27, 2009 at 3:41 PM, Sturla Molden <sturla at molden.no> wrote:
> Why does Python have a bitwise but not a logical xor operator? It's even
> weirder because boolean objects do have a __xor__ method.

It would be nice for symmetry, but it would be infrequently used
compared to the other operators and is not strictly necessary as
logical XOR cannot and would not short-circuit, unlike logical AND and


More information about the Python-ideas mailing list