whatsnew: slice.index no longer accepts negative values (or overflows).

This commit is contained in:
R David Murray 2014-02-10 21:30:42 -05:00
parent 8dffa0e5cf
commit 04e24288e1
1 changed files with 5 additions and 0 deletions

View File

@ -1720,6 +1720,11 @@ Changes in the Python API
informative :exc:`ValueError` rather than the previous more mysterious informative :exc:`ValueError` rather than the previous more mysterious
:exc:`AttributeError` (:issue:`9177`). :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 Changes in the C API
-------------------- --------------------