[issue16994] collections.Counter.least_common

2013-01-18 Thread David Coallier
Changes by David Coallier : Added file: http://bugs.python.org/file28774/16994.patch ___ Python tracker <http://bugs.python.org/issue16994> ___ ___ Python-bugs-list mailin

[issue16994] collections.Counter.least_common

2013-01-18 Thread David Coallier
David Coallier added the comment: Hi there @serhiy.storchaka, Consider the case where one would calculate the k-combination of set S. When the set has `n` elements, the number of k-combination is equal to its binomial coefficient. e.g. ( n!/( (k!(n-k)! ). One method of statistically

[issue16994] collections.Counter.least_common

2013-01-18 Thread David Coallier
Changes by David Coallier : Removed file: http://bugs.python.org/file28773/collections.Counter.least_common.patch ___ Python tracker <http://bugs.python.org/issue16

[issue16994] collections.Counter.least_common

2013-01-18 Thread David Coallier
David Coallier added the comment: Latest patch after code review round #1 -- Added file: http://bugs.python.org/file28773/collections.Counter.least_common.patch ___ Python tracker <http://bugs.python.org/issue16

[issue16994] collections.Counter.least_common

2013-01-18 Thread David Coallier
New submission from David Coallier: The `collections.Counter` library contains very useful methods for playing with dicts and sets (mainly the most_common()) function. Even though it is fairly trivial to retrieve the least common elements in a Counter() by doing Counter(...).most_common(n