Antoine Pitrou added the comment:

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)

----------
nosy: +pitrou

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22515>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to