[issue29710] Incorrect representation caveat on bitwise operation docs

Mark Dickinson report at bugs.python.org
Fri Mar 3 10:58:44 EST 2017


Mark Dickinson added the comment:

> This sentence isn't correct now that integers are always arbitrary length.

It's not really clear what that line in the docs means for Python 2, either: if values x and y both fit in an int, then so do ~x, x|y and x&y. We already assume in the Python source that the underlying representation is two's complement (no padding bits, no trap representation, etc.), so there aren't any complications from platforms where the C representation is ones' complement or sign-magnitude.

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29710>
_______________________________________


More information about the Python-bugs-list mailing list