mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Add count() method to collections.deque().
This commit is contained in:
parent
30583e3f38
commit
5f516edd77
4 changed files with 56 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue