[Python-ideas] New explicit methods to trim strings

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Mar 31 19:02:25 EDT 2019


Dan Sommers wrote:

> without_prefix
> without_suffix
> 
> They're a little longer, but IMO "without" helps
> reenforce the immutability of the underlying string.

We don't seem to worry about that distinction for other
string methods, such as lstrip and rstrip.

-- 
Greg


More information about the Python-ideas mailing list