This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author davidcoallier
Recipients davidcoallier, ezio.melotti, rhettinger, serhiy.storchaka
Date 2013-01-18.19:54:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358538889.85.0.672650416025.issue16994@psf.upfronthosting.co.za>
In-reply-to
Content
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 optimising the computation is to remove n least common elements from the set S. 

I do agree that this new method is merely for consistency because right now it is quite easy to simply do c.most_common(...)[:-(n+1):-1] to get th e least common elements. 

The goal of this patch is to make it intuitive to get the least common elements of a Counter, therefore making it easy to remove them from a collection.

Does it make any sense to you?
History
Date User Action Args
2013-01-18 19:54:49davidcoalliersetrecipients: + davidcoallier, rhettinger, ezio.melotti, serhiy.storchaka
2013-01-18 19:54:49davidcoalliersetmessageid: <1358538889.85.0.672650416025.issue16994@psf.upfronthosting.co.za>
2013-01-18 19:54:49davidcoallierlinkissue16994 messages
2013-01-18 19:54:49davidcoalliercreate