[Python-ideas] collections.Counter should implement __mul__, __rmul__

Raymond Hettinger raymond.hettinger at gmail.com
Mon Apr 16 01:37:23 EDT 2018



> On Apr 15, 2018, at 10:07 PM, Tim Peters <tim.peters at gmail.com> wrote:
> 
> Adding Counter * integer doesn't bother me a bit, but the definition
> of what that should compute isn't obvious.

Any thoughts on Counter * float?   A key use case for what is being proposed is:

    c *= 1 / c.total


Raymond



More information about the Python-ideas mailing list