Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
nostrademons
· 18y ago · 0 comments
I believe this'll only work on machines that use 2s-complement arithmetic, which is basically all of them. Just saying...it's theoretically possible to have number representations where ~0 != -1.
Comments
[–]
foonamefoo
18y ago
That wouldn't matter since we are talking about python, not assembly or C.
[–]
BrandonM
18y ago
I would hazard a guess that CPython (the reference implementation) hooks directly into C for bitwise NOT, and therefore, it
would
matter.