diff options
author | Raymond Hettinger <python@rcn.com> | 2010-04-03 23:20:46 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-04-03 23:20:46 (GMT) |
commit | 44459debc620106ed156c6ae8bc32ec02e3dec98 (patch) | |
tree | 168e377d9f3b1314365a55a3cae3a33048653021 /Doc/library | |
parent | 4893abc77ab88fbcd3a80c5017194088cb3d5a61 (diff) | |
download | cpython-44459debc620106ed156c6ae8bc32ec02e3dec98.zip cpython-44459debc620106ed156c6ae8bc32ec02e3dec98.tar.gz cpython-44459debc620106ed156c6ae8bc32ec02e3dec98.tar.bz2 |
Add count() method to collections.deque().
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/collections.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index aa17a55..3d04063 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -338,6 +338,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:: 3.2 + .. method:: extend(iterable) Extend the right side of the deque by appending elements from the iterable |