diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-04-06 18:22:06 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-04-06 18:22:06 (GMT) |
commit | 505add3ac996b6b4ff47f753fb454ca0d4edad40 (patch) | |
tree | 9434c3ec749ecbcab687cbd4bd7bbb32652902df | |
parent | 90ee4dfef4e2d945512ccdd3a4e0fc08115d7790 (diff) | |
download | cpython-505add3ac996b6b4ff47f753fb454ca0d4edad40.zip cpython-505add3ac996b6b4ff47f753fb454ca0d4edad40.tar.gz cpython-505add3ac996b6b4ff47f753fb454ca0d4edad40.tar.bz2 |
Merged revisions 79852 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79852 | mark.dickinson | 2010-04-06 19:20:11 +0100 (Tue, 06 Apr 2010) | 1 line
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 bb25956..07647b3 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -914,6 +914,9 @@ the left or right by the number of bits given by the second argument. 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)``. +.. 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: |