Why can't I xor strings?

David Bolen db3l at fitlinxx.com
Sun Oct 10 18:09:03 EDT 2004


Grant Edwards <grante at visi.com> writes:

> While I agree with your points, they're immaterial to the
> argument I was making.  The poster to which I responded was
> arguing that "xor" didn't make sense because having it coerce
> it's arguments to booleans was "wrong".

Well, actually I said:

"Logical operators work that way but not numerics ..."

so I'm not arguing against a logical "xor" working that way, but not
the existing xor (^) operation in Python, which is bitwise.

-- David



More information about the Python-list mailing list