Why can't I xor strings?

Grant Edwards grante at visi.com
Sat Oct 9 21:04:51 CEST 2004


On 2004-10-09, Jeremy Bowers <jerf at jerf.org> wrote:
>
>> Regardless of whether this is the best implementation for
>> detecting if two strings are similar, I don't see why xor for
>> strings shouldn't be supported. Am I missing something?
>
> The basic problem is that there is no obvious "xor on string" operation

Sure there is.  Strings have a boolean value, and the xor
operation on boolean values is well-defined.

-- 
Grant Edwards                   grante             Yow!  Are you mentally here
                                  at               at Pizza Hut??
                               visi.com            



More information about the Python-list mailing list