diff options
author | Raymond Hettinger <python@rcn.com> | 2015-05-13 09:50:57 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-05-13 09:50:57 (GMT) |
commit | bd049190148df537e055f4975db35574448ed0b2 (patch) | |
tree | 91fbc7ef999bfe1aaa336af16bb39e3ce98d89d9 /Doc | |
parent | b9b0a580f22b411df3993a85643b3df8e96f0eaa (diff) | |
download | cpython-bd049190148df537e055f4975db35574448ed0b2.zip cpython-bd049190148df537e055f4975db35574448ed0b2.tar.gz cpython-bd049190148df537e055f4975db35574448ed0b2.tar.bz2 |
Issue #19934: Document *None* as an acceptable input to Counter.most_common([n])
Diffstat (limited to 'Doc')
-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 b947e27..2dc60e8 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -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)] |