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

Method removesuffix

Lib/collections/__init__.py:1471–1474  ·  view source on GitHub ↗
(self, suffix, /)

Source from the content-addressed store, hash-verified

1469 return self.__class__(self.data.removeprefix(prefix))
1470
1471 def removesuffix(self, suffix, /):
1472 if isinstance(suffix, UserString):
1473 suffix = suffix.data
1474 return self.__class__(self.data.removesuffix(suffix))
1475
1476 def encode(self, encoding='utf-8', errors='strict'):
1477 encoding = 'utf-8' if encoding is None else encoding

Callers 9

_proc_gnulongMethod · 0.45
_prog_nameFunction · 0.45
_write_headersMethod · 0.45
with_nameMethod · 0.45
walk_modulesMethod · 0.45
sectionsMethod · 0.45
__init__Method · 0.45

Calls 2

isinstanceFunction · 0.85
__class__Method · 0.45

Tested by 3

walk_modulesMethod · 0.36