From 1ce504f5d938264236b620194f368e8c535cec55 Mon Sep 17 00:00:00 2001 From: Parman Mohammadalizadeh Date: Sat, 19 Sep 2026 11:59:05 +0200 Subject: [PATCH] gh-156743: Document deque.index bound resolution change in 3.14.6 --- Doc/library/collections.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 40f780c7d049d4e..42243b88dd2716d 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -548,6 +548,14 @@ or subtracting from an empty counter. .. versionadded:: 3.5 + .. versionchanged:: 3.14.6 + *start* and *stop* are both interpreted relative to the length of + the deque measured after the arguments have been converted to + integers. Previously an omitted *stop* defaulted to the length + measured before *start* was converted, so a *start* whose + :meth:`~object.__index__` method mutated the deque could leave the + two bounds resolved against different lengths. + .. method:: insert(index, value, /)