summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2016-01-27 05:44:16 (GMT)
committerRaymond Hettinger <python@rcn.com>2016-01-27 05:44:16 (GMT)
commit3743432302e9b31d4fe0db31485543a306057fc8 (patch)
tree44b17d2b0ee2b6d75db1aaa4c931527ab1a35020 /Doc
parentd4e51f45a9b82832e95dcc55ba0d8f53ca725824 (diff)
downloadcpython-3743432302e9b31d4fe0db31485543a306057fc8.zip
cpython-3743432302e9b31d4fe0db31485543a306057fc8.tar.gz
cpython-3743432302e9b31d4fe0db31485543a306057fc8.tar.bz2
Issue #26194: Fix undefined behavior for deque.insert() when len(d) == maxlen
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/collections.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 00d2916..e89da35 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -477,6 +477,9 @@ or subtracting from an empty counter.
Insert *x* into the deque at position *i*.
+ If the insertion causes a bounded deque to grow beyond *maxlen*, the
+ rightmost element is then removed to restore the size limit.
+
.. versionadded:: 3.5