On 18 December 2017 at 23:51, Joel Croteau <[email protected]> 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
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to