]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19934: Document *None* as an acceptable input to Counter.most_common([n])
authorRaymond Hettinger <python@rcn.com>
Wed, 13 May 2015 09:50:57 +0000 (02:50 -0700)
committerRaymond Hettinger <python@rcn.com>
Wed, 13 May 2015 09:50:57 +0000 (02:50 -0700)
Doc/library/collections.rst

index b947e272da4331fb68a8cd4beed04c6a6c39c3b0..2dc60e8f68bf2aa81fbc4121576aabf99077ad33 100644 (file)
@@ -104,9 +104,9 @@ For example::
    .. method:: most_common([n])
 
       Return a list of the *n* most common elements and their counts from the
-      most common to the least.  If *n* is not specified, :func:`most_common`
-      returns *all* elements in the counter.  Elements with equal counts are
-      ordered arbitrarily:
+      most common to the least.  If *n* is omitted or ``None`
+      :func:`most_common` returns *all* elements in the count
+      with equal counts are ordered arbitrarily:
 
             >>> Counter('abracadabra').most_common(3)
             [('a', 5), ('r', 2), ('b', 2)]