
May 8, 2009
8 a.m.
Mart Sõmermaa wrote:
On Fri, May 8, 2009 at 4:14 PM, Arnaud Delobelle <arnodel@googlemail.com> wrote:
2009/5/8 Mart Sõmermaa <mrts.pydev@gmail.com>:
As Multiset is arguably quite useless[...] Arguably, it is far from useless.
Can you perhaps provide a use case where a list (an "ordered multiset") does not suffice?
Raymond Hettinger has created a Counter class instead of a strict multiset class. It's useful for efficiently counting how many times things occur. Without it you would have to build a dict of counts (I've done it myself). Practicality beats purity, etc.