]> 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:47:57 +0000 (02:47 -0700)
committerRaymond Hettinger <python@rcn.com>
Wed, 13 May 2015 09:47:57 +0000 (02:47 -0700)
Doc/library/collections.rst

index 0acde1292a300df6035d7f8b90cfaed17b038b26..be154773bdd44102c2660e0085fbe2e8f04640e8 100644 (file)
@@ -268,9 +268,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 counter.  Elements
+        with equal counts are ordered arbitrarily:
 
             >>> Counter('abracadabra').most_common(3)
             [('a', 5), ('r', 2), ('b', 2)]