Elaine Jackson wrote:
> <snip>
> | Python can't *guess* how many bits you want to keep.
>> ** But it could if someone had told it that the leftmost nonzero
> digit is the place to start. I just assumed somebody had told it
> that.
And if someone had done that, it would violate the invariant:
~(~x) == x
In fact, by repeatedly applying ~ you'd eventually zero all the bits.
--
CARL BANKS http://www.aerojockey.com/software
"You don't run Microsoft Windows. Microsoft Windows runs you."