MCPcopy Index your code
hub / github.com/python/cpython / count

Method count

Lib/collections/__init__.py:1501–1504  ·  view source on GitHub ↗
(self, sub, start=0, end=_sys.maxsize)

Source from the content-addressed store, hash-verified

1499 return self.__class__(self.data.center(width, *args))
1500
1501 def count(self, sub, start=0, end=_sys.maxsize):
1502 if isinstance(sub, UserString):
1503 sub = sub.data
1504 return self.data.count(sub, start, end)
1505
1506 def removeprefix(self, prefix, /):
1507 if isinstance(prefix, UserString):

Callers 1

test_implementationMethod · 0.95

Calls 1

countMethod · 0.45

Tested by 1

test_implementationMethod · 0.76