gh-109812: Fix phrasing for `collections.Counter` (gh-109813)

This commit is contained in:
Jacob Coffee 2023-09-27 21:29:39 -05:00 committed by GitHub
parent f65f9e80fe
commit 99fba5f156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -349,6 +349,7 @@ Robbie Clemons
Steve Clift
Hervé Coatanhay
Riccardo Coccioli
Jacob Coffee
Nick Coghlan
Josh Cogliati
Noam Cohen