On Sun, Feb 14, 2010 at 09:16:18AM -0000, Alan Gauld wrote:
> But ths is not simple integer arithmetic it is bit m,anippulation. 
> You can use bit manipulation to fake arithmetic but they are 
> fundamentally different operations and may not always 
> produce the same results depending on how the designer 
> built it!

And this brings us back to one of Python's philosophical points.
State clearly and explicitly what you mean to be doing.  If you
are doing bit manipulation, use bit manipulation operators.  All
the valid points above in this thread aside, it will make maintain-
ing your code easier in the future if it's very clear what you
intended the code to accomplish, and how.


-- 
Steve Willoughby    |  Using billion-dollar satellites
[email protected]   |  to hunt for Tupperware.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to