Tim Peters <t...@python.org> added the comment:
Nick, that seems a decent compromise. "Infinite string of sign bits" is how Guido & I both thought of it when the semantics of longs were first defined, and others in this report apparently find it natural enough too. It also applies to all 6 operations in the table as-is. It appears that a bit-width of ``1 + max(x.bit_length(), y.bit_length()`` only applies as-is to 3 (~ has only one operand, while the bit length of the RHS doesn't matter for << and >>). Provided that's clarified, I'd only suggest inserting "at least" before "one extra sign extension bit" and after "a bit-width of". That's a bridge between the "infinite" and "fixed-albeit-variable-width" views: "plus 1" is the smallest approximation to infinity that works, but anything at least that large works too. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29710> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com