[pydotorg-www] Meaningful typo in bitwise operator article
Chris Angelico
rosuav at gmail.com
Wed Dec 8 05:09:56 EST 2021
On Wed, Dec 8, 2021 at 9:08 PM Ben Rosenberg <bar94 at cornell.edu> wrote:
>
> To whom it may concern:
>
> In the article on bitwise operators here: https://wiki.python.org/moin/BitwiseOperators there is a meaningful typo under `~x`. It says “This is the same as -x – 1”, where it should be “-x + 1”.
>
>>> ~5
-6
>>> -5 - 1
-6
>>> x = -5
>>> ~x
4
>>> -x - 1
4
ChrisA
More information about the pydotorg-www
mailing list