STINNER Victor <victor.stin...@haypocalc.com> added the comment:

It would be interesting to have Counter.elements_count() if it has a complexity 
of O(1): if the collections maintains a total (in a private attribute).

Otherwise, I think that sum(c.values()) is enough and can be documented as an 
example in the Counter doc.

----------
nosy: +haypo

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11733>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to