[Python-ideas] Adding a `Counter.elements_length` method

cool-RR cool-rr at cool-rr.com
Thu Mar 31 23:42:31 CEST 2011

On Thu, Mar 31, 2011 at 11:37 PM, Raymond Hettinger <
raymond.hettinger at gmail.com> wrote:

> On Mar 31, 2011, at 2:28 PM, cool-RR wrote:
> > I suggest a `Counter.elements_length` method should be added, that would
> give the same answer as `sum(counter.itervalues())`. What do you think?
> Please open a feature request on the bug tracker and assign it to me.
> For the time being, I'm reluctant to further fatten the API, but this
> isn't an unreasonable request and there is precedent with
> Smalltalk's Bag API.  On the other hand, sum(c.values()) is
> somewhat trivial.
> Raymond



<http://bugs.python.org/issue11733>I'm unable to assign it to you. (I guess
it takes some kind of credentials to do that?) I put you on the nosy list.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110331/c3a23b7e/attachment.html>

More information about the Python-ideas mailing list