[issue22515] Implement partial order on Counter

Antoine Pitrou report at bugs.python.org
Wed Oct 1 19:18:48 CEST 2014


Antoine Pitrou added the comment:

> I'll go with +0.5.  :)

I was going to make a joke about Counters only accepting integral values, but the constructor is actually quite laxist:

>>> Counter({'a': 2.5})
Counter({'a': 2.5})
>>> Counter({'a': 2.5 + 1j})
Counter({'a': (2.5+1j)})
>>> Counter({'a': 'b'})
Counter({'a': 'b'})

(!)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22515>
_______________________________________


More information about the Python-bugs-list mailing list