Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 505add3

Browse files
committed
Merged revisions 79852 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent 90ee4df commit 505add3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Doc/reference/expressions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,9 @@ the left or right by the number of bits given by the second argument.
914914
A right shift by *n* bits is defined as division by ``pow(2,n)``. A left shift
915915
by *n* bits is defined as multiplication with ``pow(2,n)``.
916916

917+
.. note:: In the current implementation, the right-hand operand is required
918+
to be at most :attr:`sys.maxsize`. If the right-hand operand is larger than
919+
:attr:`sys.maxsize` an :exc:`OverflowError` exception is raised.
917920

918921
.. _bitwise:
919922

0 commit comments

Comments
 (0)