[New-bugs-announce] [issue40411] frozen collection.Counter

paul rubin report at bugs.python.org
Mon Apr 27 19:59:59 EDT 2020


New submission from paul rubin <phr-pythonbugs at nightsong.com>:

It would be nice to have frozen Counters analogous to frozensets, so they are usable as dictionary keys.  One can of course create frozenset(counter.items()) but that means the set items are tuples rather than the original set elements, so it's no longer quick to check membership.  I can work around this in my immediate application but it seems like a shortcoming.  There are some other set operations that aren't supported by counters either, that would be nice if they are conceptually multisets.

----------
components: Library (Lib)
messages: 367472
nosy: phr
priority: normal
severity: normal
status: open
title: frozen collection.Counter
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40411>
_______________________________________


More information about the New-bugs-announce mailing list