Adding a `Counter.elements_length` method

Hello folks, I suggest a `Counter.elements_length` method should be added, that would give the same answer as `sum(counter.itervalues())`. What do you think? Ram.

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

On Thu, Mar 31, 2011 at 11:37 PM, Raymond Hettinger < raymond.hettinger@gmail.com> wrote:
Done: http://bugs.python.org/issue11733 <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. Ram.

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

On Thu, Mar 31, 2011 at 11:37 PM, Raymond Hettinger < raymond.hettinger@gmail.com> wrote:
Done: http://bugs.python.org/issue11733 <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. Ram.
participants (2)
-
cool-RR
-
Raymond Hettinger