diff options
author | Jacob Coffee <jacob@z7x.org> | 2023-09-28 02:29:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-28 02:29:39 (GMT) |
commit | 99fba5f156386cf8f4a71321708690cdb9357ffc (patch) | |
tree | b08270f5ee52ffcf32b12e4ece20f759c94a277d /Doc | |
parent | f65f9e80fe741c894582a3e413d4e3318c1ed626 (diff) | |
download | cpython-99fba5f156386cf8f4a71321708690cdb9357ffc.zip cpython-99fba5f156386cf8f4a71321708690cdb9357ffc.tar.gz cpython-99fba5f156386cf8f4a71321708690cdb9357ffc.tar.bz2 |
gh-109812: Fix phrasing for `collections.Counter` (gh-109813)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/collections.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 03cb1dc..43f4ff0 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -358,7 +358,7 @@ Common patterns for working with :class:`Counter` objects:: list(c) # list unique elements set(c) # convert to a set dict(c) # convert to a regular dictionary - c.items() # convert to a list of (elem, cnt) pairs + c.items() # access the (elem, cnt) pairs Counter(dict(list_of_pairs)) # convert from a list of (elem, cnt) pairs c.most_common()[:-n-1:-1] # n least common elements +c # remove zero and negative counts |