Why can't I xor strings?

Ville Vainio ville at spammers.com
Sun Oct 10 02:55:46 EDT 2004


>>>>> "Grant" == Grant Edwards <grante at visi.com> writes:

    Grant> I don't know what you mean by that.  Nobody seems to have a
    Grant> problem with "and" "or" and "not" operators using the truth
    Grant> values of strings.  What is there about "xor" that
    Grant> precludes it from behaving similarly?

It's just that logical xor is an extremely rare beast. I would
probably prefer to see the operation expanded to the more typical
and-or-nots in real code.

-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list