Commit a5db4310 authored by Mark Dickinson's avatar Mark Dickinson

Issue #8259: Clarify that there's an upper bound on the right-hand operand of a shift operator.

parent 3b4c989c
...@@ -1000,6 +1000,9 @@ A right shift by *n* bits is defined as division by ``pow(2, n)``. A left shift ...@@ -1000,6 +1000,9 @@ A right shift by *n* bits is defined as division by ``pow(2, n)``. A left shift
by *n* bits is defined as multiplication with ``pow(2, n)``. Negative shift by *n* bits is defined as multiplication with ``pow(2, n)``. Negative shift
counts raise a :exc:`ValueError` exception. counts raise a :exc:`ValueError` exception.
.. note:: In the current implementation, the right-hand operand is required
to be at most :attr:`sys.maxsize`. If the right-hand operand is larger than
:attr:`sys.maxsize` an :exc:`OverflowError` exception is raised.
.. _bitwise: .. _bitwise:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment