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

Method removesuffix

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

Source from the content-addressed store, hash-verified

1509 return self.__class__(self.data.removeprefix(prefix))
1510
1511 def removesuffix(self, suffix, /):
1512 if isinstance(suffix, UserString):
1513 suffix = suffix.data
1514 return self.__class__(self.data.removesuffix(suffix))
1515
1516 def encode(self, encoding='utf-8', errors='strict'):
1517 encoding = 'utf-8' if encoding is None else encoding

Callers 13

conf.pyFile · 0.45
_proc_gnulongMethod · 0.45
_prog_nameFunction · 0.45
_write_headersMethod · 0.45
_write_headersMethod · 0.45
with_nameMethod · 0.45
__init__Method · 0.45
_find_childrenMethod · 0.45
_get_brew_llvm_prefixFunction · 0.45
add_c_converterFunction · 0.45
__init__Method · 0.45

Calls 1

__class__Method · 0.45

Tested by

no test coverage detected