[issue28296] Add __le__ and __ge__ to collections.Counter

2016-09-28 Thread R. David Murray
Changes by R. David Murray : -- status: open -> closed ___ Python tracker ___ ___

[issue28296] Add __le__ and __ge__ to collections.Counter

2016-09-28 Thread Manuel Krebber
Manuel Krebber added the comment: Oh, I should have searched properly before creating this ticket. Sorry about that. I guess I will be subclassing Counter in my project then, to get this functionality... Only problem is, that when using the builtin __add__ etc. of my Counter subclass, I will

[issue28296] Add __le__ and __ge__ to collections.Counter

2016-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue22515. -- nosy: +rhettinger, serhiy.storchaka resolution: -> duplicate superseder: -> Implement partial order on Counter ___ Python tracker

[issue28296] Add __le__ and __ge__ to collections.Counter

2016-09-28 Thread Manuel Krebber
New submission from Manuel Krebber: I would really like there to be comparison operators for collection.Counter similar to the ones for sets. While you can now use minus to some degree for that comparison, it is very inefficient. I have attached an implementation of __ge__ and __le__ as a