From: R David Murray Date: Tue, 11 Feb 2014 02:30:42 +0000 (-0500) Subject: whatsnew: slice.index no longer accepts negative values (or overflows). X-Git-Tag: v3.4.1rc1~233^2~363 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=04e24288e1b203280794795542a480277d19e820;p=thirdparty%2FPython%2Fcpython.git whatsnew: slice.index no longer accepts negative values (or overflows). --- diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index b1ef2775b23e..8e028e66031b 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -1720,6 +1720,11 @@ Changes in the Python API informative :exc:`ValueError` rather than the previous more mysterious :exc:`AttributeError` (:issue:`9177`). +* :meth:`slice.indices` no longer produces an :exc:`OverflowError` for huge + values. As a consequence of this fix, :meth:`slice.indices` now raises a + :exc:`ValueError` if given a negative length; previously it returned nonsense + values (:issue:`14794`). + Changes in the C API --------------------