Getting rid of bitwise operators in Python 3?

Robert Kern robert.kern at gmail.com
Sat Sep 22 03:03:47 EDT 2007


Carl Banks wrote:
> Anyone with me here?  (I know the deadline for P3 PEPs has passed; this 
> is just talk.)

I'm not.  :-)

We use them in numpy. The bitwise operations on int and float arrays aren't all
that useful, but they are very useful for bool arrays. We can't use the
"and"/"or"/"not" keywords since they can't be overloaded, but they bitwise
operators fill the need fairly well. We've had
logical_and()/logical_or()/logical_not() functions since forever, too, and
they're a pain in the ass.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Python-list mailing list