diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-04-06 18:20:11 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-04-06 18:20:11 (GMT) |
commit | a5db4310f312727b49f5ea5d32e575be6b91bdf8 (patch) | |
tree | afda3daf9fd9d1145bbe8f0eb506e94073176052 | |
parent | 3b4c989cfdb396fc0e1800846b4de76a382bd77c (diff) | |
download | cpython-a5db4310f312727b49f5ea5d32e575be6b91bdf8.zip cpython-a5db4310f312727b49f5ea5d32e575be6b91bdf8.tar.gz cpython-a5db4310f312727b49f5ea5d32e575be6b91bdf8.tar.bz2 |
Issue #8259: Clarify that there's an upper bound on the right-hand operand of a shift operator.
-rw-r--r-- | Doc/reference/expressions.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 4677fdc..60ab6ea 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -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 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: |