diff options
author | Raymond Hettinger <python@rcn.com> | 2010-04-03 18:10:37 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-04-03 18:10:37 (GMT) |
commit | 5f516edd77d00cae24d287285e455833d44097a7 (patch) | |
tree | b641c275a7a93359ee7568c77350e96b50e00339 /Doc | |
parent | 30583e3f3890feb59fcedd74637d83c0c03ad958 (diff) | |
download | cpython-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.rst | 6 |
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 |