On Friday, July 20, 2018 at 2:00:26 AM UTC-7, Brian Oney wrote:

> Are 16|1 and 16+1 internally the same operation (for integers)?

For 16 and 1, the output of the two operations happen to be the same, but 
generally a bitwise OR is not the same are addition.  There are no carry bits 
in the bitwise operation!  1 + 1 = 2.  But 1 | 1 = 1.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to