summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-10-06 10:37:21 (GMT)
committerGeorg Brandl <georg@python.org>2013-10-06 10:37:21 (GMT)
commit924c822f735e2dd1680e0fe97d460d3da7259bf7 (patch)
treed6ee8b81c1f8d5ab72e18303632a9e8c1af54b2a /Doc/library
parent3e1e1cfaa6617830fdf01560b42b950f9b459874 (diff)
parent87f3d7bb54cf2c546bde694b14c5e588fc3e7dbc (diff)
downloadcpython-924c822f735e2dd1680e0fe97d460d3da7259bf7.zip
cpython-924c822f735e2dd1680e0fe97d460d3da7259bf7.tar.gz
cpython-924c822f735e2dd1680e0fe97d460d3da7259bf7.tar.bz2
merge with 3.3
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/collections.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 96c5aef..c59bb0c 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -312,7 +312,7 @@ Common patterns for working with :class:`Counter` objects::
dict(c) # convert to a regular dictionary
c.items() # convert to a list of (elem, cnt) pairs
Counter(dict(list_of_pairs)) # convert from a list of (elem, cnt) pairs
- c.most_common()[:-n:-1] # n least common elements
+ c.most_common()[:-n-1:-1] # n least common elements
+c # remove zero and negative counts
Several mathematical operations are provided for combining :class:`Counter`