Skip to content

Commit

Permalink
pythongh-109812: Fix phrasing for collections.Counter (pythongh-109813
Browse files Browse the repository at this point in the history
)
  • Loading branch information
JacobCoffee committed Sep 28, 2023
1 parent f65f9e8 commit 99fba5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ Robbie Clemons
Steve Clift
Hervé Coatanhay
Riccardo Coccioli
Jacob Coffee
Nick Coghlan
Josh Cogliati
Noam Cohen
Expand Down

0 comments on commit 99fba5f

Please sign in to comment.