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

Method replace

Lib/collections/__init__.py:1596–1601  ·  view source on GitHub ↗
(self, old, new, maxsplit=-1)

Source from the content-addressed store, hash-verified

1594 return self.data.partition(sep)
1595
1596 def replace(self, old, new, maxsplit=-1):
1597 if isinstance(old, UserString):
1598 old = old.data
1599 if isinstance(new, UserString):
1600 new = new.data
1601 return self.__class__(self.data.replace(old, new, maxsplit))
1602
1603 def rfind(self, sub, start=0, end=_sys.maxsize):
1604 if isinstance(sub, UserString):

Callers 4

namedtupleFunction · 0.45
singletonMethod · 0.45
openFunction · 0.45
__init__.pyFile · 0.45

Calls 1

__class__Method · 0.45

Tested by

no test coverage detected