summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2007-12-13 00:08:37 (GMT)
committerRaymond Hettinger <python@rcn.com>2007-12-13 00:08:37 (GMT)
commitadf9ffdfbe0fb00f5a47444c1dc53eb280d0bd0a (patch)
treed006a49e33601df220458519b651e15660108b26 /Modules
parent842c178442a9b9b855d9773dbe2e8ac3d6d79895 (diff)
downloadcpython-adf9ffdfbe0fb00f5a47444c1dc53eb280d0bd0a.zip
cpython-adf9ffdfbe0fb00f5a47444c1dc53eb280d0bd0a.tar.gz
cpython-adf9ffdfbe0fb00f5a47444c1dc53eb280d0bd0a.tar.bz2
Fix bug 1604. deque.__init__() did not clear existing contents like list.__init__. Not a backport candidate.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_collectionsmodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index e5c3218..9efbc27 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -843,6 +843,7 @@ deque_init(dequeobject *deque, PyObject *args, PyObject *kwdargs)
}
}
deque->maxlen = maxlen;
+ deque_clear(deque);
if (iterable != NULL) {
PyObject *rv = deque_extend(deque, iterable);
if (rv == NULL)