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 phr
Recipients aeros, phr, rhettinger
Date 2020-04-28.03:35:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588044919.37.0.564324477071.issue40411@roundup.psfhosted.org>
In-reply-to
Content
Yes, the idea was for them to be hashable, to be used as dict keys.  E.g. if you use frozensets to model graphs, you'd use frozen multisets for hypergraphs.  My immediate use case involved word puzzles, e.g. treating words as bags of scrabble tiles with letters on them, and finding out what other words you could form from the letters.  It is not a pressing need.  

I'm trying to remember what the other missing operation I ran into was, a few days ago.  It may have been subset.  I found a workaround but it seemed a bit ugly.  It would be nice if Counters could also be thought of as multisets which can do the same things sets can do with unneeded head scratching.  It seems like counters and multisets/bags really are different things conceptually.  Their operations and implementations overlap, but they are different.  E.g. it can make sense for a counter to have a negative count of something, but not for a bag.
History
Date User Action Args
2020-04-28 03:35:19phrsetrecipients: + phr, rhettinger, aeros
2020-04-28 03:35:19phrsetmessageid: <1588044919.37.0.564324477071.issue40411@roundup.psfhosted.org>
2020-04-28 03:35:19phrlinkissue40411 messages
2020-04-28 03:35:18phrcreate