Does Python need an 'xor' operator?

Martin v. Löwis loewis at informatik.hu-berlin.de
Sun Apr 14 10:42:44 EDT 2002


grante at visi.com (Grant Edwards) writes:

> Point is that "^" operates bitwise, and there is no
> exclusive-or operation for "truth" values.

That depends on the argument types. If both arguments are of type
bool, ^ performs exclusive-or.

Regards,
Martin




More information about the Python-list mailing list