On Jul 14, 8:43 pm, Chris Rebert <c...@rebertia.com> wrote:
> On Tue, Jul 14, 2009 at 11:47 AM, Mark Dickinson<dicki...@gmail.com> wrote:
> > (1) It's easy to emulate xor:  'x xor y' <-> bool(x) != bool(y)
>
> Using the xor bitwise operator is also an option:
> bool(x) ^ bool(y)

Good point.  For some reason I expected bitwise operations on bools to
return ints rather than bools.  Now I know better. :-)

Thanks,

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to