Does Python need an 'xor' operator?

phil hunt philh at comuno.freeserve.co.uk
Sun Apr 14 13:59:57 EDT 2002


On 14 Apr 2002 01:09:44 +0200, Martin v. Loewis <martin at v.loewis.de> wrote:
>"Ken Peek" <Ken.Peek at SpiritSongDesigns.comNOSPAM> writes:
>
>> You didn't read my post well enough-- we can already _DO_
>> that with Python v2.2.x:
>
>I read your post. You said that the idiom you bring up is not clear to
>you; I agree - adding a "not" just to get a 0/1 value is not clear.
>
>To me, using a function called "bool" is very clear.

To me, the idea that ^ means xor is totally unclear.

What's wrong with xor meaning xor?

-- 
<"><"><"> Philip Hunt <philh at comuno.freeserve.co.uk> <"><"><">
"I would guess that he really believes whatever is politically 
advantageous for him to believe." 
                        -- Alison Brooks, referring to Michael
                              Portillo, on soc.history.what-if



More information about the Python-list mailing list