From 99fba5f156386cf8f4a71321708690cdb9357ffc Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Wed, 27 Sep 2023 21:29:39 -0500 Subject: gh-109812: Fix phrasing for `collections.Counter` (gh-109813) --- Doc/library/collections.rst | 2 +- Misc/ACKS | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 diff --git a/Misc/ACKS b/Misc/ACKS index aaa178f..ccdfae6 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -349,6 +349,7 @@ Robbie Clemons Steve Clift Hervé Coatanhay Riccardo Coccioli +Jacob Coffee Nick Coghlan Josh Cogliati Noam Cohen -- cgit v0.12