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 pitrou
Recipients cool-RR, ethan.furman, josh.r, pitrou, r.david.murray, serhiy.storchaka, steven.daprano
Date 2014-09-29.22:54:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412031255.62.0.541505261621.issue22515@psf.upfronthosting.co.za>
In-reply-to
Content
The request sounds ok to me. As in the corner case of negative values, it seems that Counter currently doesn't elide zero values, e.g.:

>>> Counter({'a': 0}) == Counter({})
False

Therefore, we should have:

>>> Counter({'a': -1}) < Counter({'a': 0})
True

but:

>>> Counter({'a': -1}) < Counter({})
False

(I must admit, the current semantics of Counter look a bit ad hoc and not terribly consistent... halfway between a regular mapping and a multiset)
History
Date User Action Args
2014-09-29 22:54:15pitrousetrecipients: + pitrou, steven.daprano, r.david.murray, cool-RR, ethan.furman, serhiy.storchaka, josh.r
2014-09-29 22:54:15pitrousetmessageid: <1412031255.62.0.541505261621.issue22515@psf.upfronthosting.co.za>
2014-09-29 22:54:15pitroulinkissue22515 messages
2014-09-29 22:54:15pitroucreate