OK, that makes sense to me. Given that, there'd be two changes proposed.
1. Replace the opening paragraph of https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types (the one I originally quoted when opening this issue) with the text:
=====================
Bitwise operations only make sense for integers. The result of bitwise operations is calculated as though carried out in two's complement with an infinite number of sign bits.
=====================
2. Add a new footnote ``(4)`` to the table for the ``|``, ``^``, and ``&`` entries that reads:
=====================
4. Performing these calculations with at least one extra sign extension bit in the internal representation (a working bit-width of ``1 + max(x.bit_length(), y.bit_length()`` or more) is sufficient to get the same result as if there were an infinite number of sign bits.
===================== |