This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients cool-RR, rhettinger, vstinner
Date 2011-03-31.21:51:53
SpamBayes Score 0.029776039
Marked as misclassified No
Message-id <1301608314.12.0.270300951775.issue11733@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-03-31 21:51:54vstinnersetrecipients: + vstinner, rhettinger, cool-RR
2011-03-31 21:51:54vstinnersetmessageid: <1301608314.12.0.270300951775.issue11733@psf.upfronthosting.co.za>
2011-03-31 21:51:53vstinnerlinkissue11733 messages
2011-03-31 21:51:53vstinnercreate