Searched refs:removesuffix (Results 1 – 5 of 5) sorted by relevance
64 name = filename.removesuffix(".py")
1417 def removesuffix(self, suffix, /): member in UserString1420 return self.__class__(self.data.removesuffix(suffix))
1919 .. method:: str.removesuffix(suffix, /)1925 >>> 'MiscTests'.removesuffix('Tests')1927 >>> 'TmpDirMixin'.removesuffix('Tests')1989 See :meth:`str.removesuffix` for a method that will remove a single suffix1994 >>> 'Monty Python'.removesuffix(' Python')2698 .. method:: bytes.removesuffix(suffix, /)2699 bytearray.removesuffix(suffix, /)2705 >>> b'MiscTests'.removesuffix(b'Tests')2707 >>> b'TmpDirMixin'.removesuffix(b'Tests')3027 :term:`bytes-like object`. See :meth:`~bytes.removesuffix` for a method[all …]
250 Added str.removeprefix and str.removesuffix methods and corresponding bytes,
168 :meth:`str.removesuffix(suffix)<str.removesuffix>` have been added