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