[Python-checkins] cpython: whatsnew: slice.index no longer accepts negative values (or overflows).
r.david.murray
python-checkins at python.org
Tue Feb 11 03:30:59 CET 2014
http://hg.python.org/cpython/rev/463654af6349
changeset: 89128:463654af6349
user: R David Murray <rdmurray at bitdance.com>
date: Mon Feb 10 21:30:42 2014 -0500
summary:
whatsnew: slice.index no longer accepts negative values (or overflows).
files:
Doc/whatsnew/3.4.rst | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -1720,6 +1720,11 @@
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
--------------------
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list