[issue25478] Consider adding a normalize() method to collections.Counter()

Raymond Hettinger report at bugs.python.org
Sun Jun 24 02:47:09 EDT 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Vedran, Counters do explicitly support floats, decimals, ints, fractions, etc. 

Also, total() needs to be a method rather than a property to be consistent with the existing API and for clarity that a computation is being performed (as opposed to looking up a running total or other cheap operation).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25478>
_______________________________________


More information about the Python-bugs-list mailing list