Getting rid of bitwise operators in Python 3?

Paul Rubin http
Sat Sep 22 14:54:03 EDT 2007


Carl Banks <pavlovevidence at gmail.com> writes:
> If anyone says, "But that takes away an easy test for oddness (x&1)!", 
> or, "But you can multiply powers of two using left shift!  Isn't that 
> cool?", I'm not buying it.  Those are gimmicks.  Arithmetic operations 
> should be done with arithmetic operators.  The bitwise operators make the 
> code much less readable, especially to people unfamiliar with this usage.

The bitwise operators are used for set operations, which were
added fairly recently, if that hasn't been mentioned yet.  They
make good sense for that.



More information about the Python-list mailing list