Does Python need an 'xor' operator?
Boris Borcic
borcis at geneva-link.ch
Mon Apr 15 07:47:06 EDT 2002
Tim Peters wrote:
> I doubt that a new "xor" operator will ever get in (compelling use cases are
> conspicuous by absence), but anyone pushing for it had better push for a new
> "eqv" operator too (that is, if you're going to claim that it's ugly that
> x^y may not return one of its argument, surely it's just as ugly that the
> same holds for x==y).
Indeed, x == y should behave like (x == y) and (x or not y) !
Boris
--
assert 304 in 340343, ParadiseMismatchError
More information about the Python-list
mailing list