diff options
author | Raymond Hettinger <python@rcn.com> | 2015-05-13 09:47:57 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-05-13 09:47:57 (GMT) |
commit | a3780259e4ca668109a86054696002bc1b2700ce (patch) | |
tree | f632bc5216bd2f2fb8a9bb35cc8e8cfec41ef4b0 | |
parent | 19a3f17cb31a294e46ba82a34c887e3f16807505 (diff) | |
download | cpython-a3780259e4ca668109a86054696002bc1b2700ce.zip cpython-a3780259e4ca668109a86054696002bc1b2700ce.tar.gz cpython-a3780259e4ca668109a86054696002bc1b2700ce.tar.bz2 |
Issue #19934: Document *None* as an acceptable input to Counter.most_common([n])
-rw-r--r-- | Doc/library/collections.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index 0acde12..be15477 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -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)] |