[Python-checkins] r79852 - python/trunk/Doc/reference/expressions.rst

mark.dickinson python-checkins at python.org
Tue Apr 6 20:20:11 CEST 2010


Author: mark.dickinson
Date: Tue Apr  6 20:20:11 2010
New Revision: 79852

Log:
Issue #8259: Clarify that there's an upper bound on the right-hand operand of a shift operator.

Modified:
   python/trunk/Doc/reference/expressions.rst

Modified: python/trunk/Doc/reference/expressions.rst
==============================================================================
--- python/trunk/Doc/reference/expressions.rst	(original)
+++ python/trunk/Doc/reference/expressions.rst	Tue Apr  6 20:20:11 2010
@@ -1000,6 +1000,9 @@
 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:
 


More information about the Python-checkins mailing list