[issue29816] Get rid of C limitation for shift count in right shift

STINNER Victor report at bugs.python.org
Wed Mar 15 06:03:27 EDT 2017


STINNER Victor added the comment:

> I think an OverflowError is appropriate here for denoting the platform and implementation limitation.

It's common that integer overflow on memory allocation in C code raises a MemoryError, not an OverflowError.

>>> "x" * (2**60)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError

I suggest to raise a MemoryError.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29816>
_______________________________________


More information about the Python-bugs-list mailing list