Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ total
Method
total
Lib/collections/__init__.py:621–623 ·
view source on GitHub ↗
Sum of the counts
(self)
Source
from the content-addressed store, hash-verified
619
return
0
620
621
def
total(self):
622
'Sum of the counts'
623
return
sum(self.values())
624
625
def
most_common(self, n=None):
626
''
&
#x27;List the n most common elements and their counts from the most
Callers
3
test_total
Method · 0.95
test_binomialvariate
Method · 0.95
iter_pre_succ_pairs_tables
Function · 0.80
Calls
1
values
Method · 0.45
Tested by
2
test_total
Method · 0.76
test_binomialvariate
Method · 0.76