summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-04-03 18:10:37 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-04-03 18:10:37 (GMT)
commit5f516edd77d00cae24d287285e455833d44097a7 (patch)
treeb641c275a7a93359ee7568c77350e96b50e00339 /Doc
parent30583e3f3890feb59fcedd74637d83c0c03ad958 (diff)
downloadcpython-5f516edd77d00cae24d287285e455833d44097a7.zip
cpython-5f516edd77d00cae24d287285e455833d44097a7.tar.gz
cpython-5f516edd77d00cae24d287285e455833d44097a7.tar.bz2
Add count() method to collections.deque().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/collections.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 5a6f0de..f4ba51a 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -358,6 +358,12 @@ counts, but the output will exclude results with counts of zero or less.
Remove all elements from the deque leaving it with length 0.
+ .. method:: count(x)
+
+ Count the number of deque elements equal to *x*.
+
+ .. versionadded:: 2.7
+
.. method:: extend(iterable)
Extend the right side of the deque by appending elements from the iterable