MCPcopy Index your code
hub / github.com/RustPython/RustPython / replace

Method replace

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

Source from the content-addressed store, hash-verified

1554 return self.data.partition(sep)
1555
1556 def replace(self, old, new, maxsplit=-1):
1557 if isinstance(old, UserString):
1558 old = old.data
1559 if isinstance(new, UserString):
1560 new = new.data
1561 return self.__class__(self.data.replace(old, new, maxsplit))
1562
1563 def rfind(self, sub, start=0, end=_sys.maxsize):
1564 if isinstance(sub, UserString):

Callers 3

namedtupleFunction · 0.45
openFunction · 0.45
__init__.pyFile · 0.45

Calls 2

isinstanceFunction · 0.85
__class__Method · 0.45

Tested by

no test coverage detected