Why can't I xor strings?
Grant Edwards
grante at visi.com
Mon Oct 11 10:26:17 EDT 2004
On 2004-10-11, Alex Martelli <aleaxit at yahoo.com> wrote:
> Grant Edwards <grante at visi.com> wrote:
> ...
>> Probably so, but that doesn't support the arguement that
>> there's something wrong with a logical xor argument coercing
>> it's operands to boolean values unless one also argues that
>> the logical "and", "or" and "not" operators should also not
>> coerce their operands to booleans.
>
> One of the greatest sources of usefulness for 'and' and 'or' is exactly
> that these operators _don't_ coerce their operands
Surely they must coerce the operands for the "test" part if not
for the "return" part.
--
Grant Edwards grante Yow! Being a BALD HERO
at is almost as FESTIVE as a
visi.com TATTOOED KNOCKWURST.
More information about the Python-list
mailing list