]> granicus.if.org Git - python/commitdiff
Merged revisions 79852 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Tue, 6 Apr 2010 18:22:06 +0000 (18:22 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Tue, 6 Apr 2010 18:22:06 +0000 (18:22 +0000)
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.
........

Doc/reference/expressions.rst

index bb25956dbc56bd5cc70a61d0e3b0ac4bbf826438..07647b3a340ae449f72ff1e977e8dac728a9749b 100644 (file)
@@ -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: