
Dec. 19, 2017
11:08 a.m.
On 18 December 2017 at 23:51, Joel Croteau <jcroteau@gmail.com> wrote:
It would be useful in many scenarios for values in collections.Counter to be allowed to be floating point.
Do you have any evidence of this? Code examples that would be significantly improved by such a change? I can't think of any myself. I might consider writing totals - defaultdict(float) for ...: totals[something] = calculation(something) but using a counter is neither noticeably easier, nor clearer... One way of demonstrating such a need would be if your proposed behaviour were available on PyPI and getting used a lot - I'm not aware of any such module if it is. Paul