[Python-ideas] New explicit methods to trim strings

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Mar 25 18:27:42 EDT 2019


Dan Sommers wrote:

> So what it is "hello" - "world"?

If we were to implement the entire group, it would be an element
that can't be written in any simpler form.

We could do that by representing a string as a sequence of
signed substrings, and performing cancellations whereever
possible during concatenation.

But that would be a huge amount of machinery just to provide
a cute notation for removing a prefix or suffix, with little
in the way of other obvious applications.

-- 
Greg


More information about the Python-ideas mailing list