Message132711
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. |
|
Date |
User |
Action |
Args |
2011-03-31 21:51:54 | vstinner | set | recipients:
+ vstinner, rhettinger, cool-RR |
2011-03-31 21:51:54 | vstinner | set | messageid: <1301608314.12.0.270300951775.issue11733@psf.upfronthosting.co.za> |
2011-03-31 21:51:53 | vstinner | link | issue11733 messages |
2011-03-31 21:51:53 | vstinner | create | |
|