]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-109812: Fix phrasing for `collections.Counter` (gh-109813)
authorJacob Coffee <jacob@z7x.org>
Thu, 28 Sep 2023 02:29:39 +0000 (21:29 -0500)
committerGitHub <noreply@github.com>
Thu, 28 Sep 2023 02:29:39 +0000 (21:29 -0500)
Doc/library/collections.rst
Misc/ACKS

index 03cb1dca8f816c53c6fbadd70d8969784615418b..43f4ff077b40e075899184522e59f62e032d4464 100644 (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
index aaa178fc3b5d081df79ae3f679087ec3ed6676c2..ccdfae66832f0e07deea5bbdcaf92480fc4e725a 100644 (file)
--- 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