]> granicus.if.org Git - python/commitdiff
Issue #8259: Clarify that there's an upper bound on the right-hand operand of a shift...
authorMark Dickinson <dickinsm@gmail.com>
Tue, 6 Apr 2010 18:20:11 +0000 (18:20 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Tue, 6 Apr 2010 18:20:11 +0000 (18:20 +0000)
Doc/reference/expressions.rst

index 4677fdc85bc26e5a851043bd0b4cb5239dd21f58..60ab6ea672e9ffb8ba72892fc20a9e81d7edab0b 100644 (file)
@@ -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: