[issue40755] Add missing multiset predicates to collections.Counter
Vedran Čačić
report at bugs.python.org
Mon May 25 23:47:36 EDT 2020
Vedran Čačić <vedgar at gmail.com> added the comment:
isequal is really strange considering we're talking about Python here. Do any of other stdlib types have that method instead of just using == (which works fine even now)? I'd even spell the second and third as <= and >=, same as set does.
But if we're finally going to accept that Counters are just bags (CS term for multisets), then surely .add and .remove (and maybe .discard, setting the count to 0) would be more natural additions. I can't count (pun intended) all the times I had to write that '] += 1' just to count some element.
----------
nosy: +veky
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40755>
_______________________________________
More information about the Python-bugs-list
mailing list