[Python-ideas] Re: Adding str.remove()

2021-05-01 Thread Stephen J. Turnbull
David Mertz writes: > Lots of things "should be" :-). Sadly, I deal with "actually existing data." What I would do to experience your kind of sadness! I spend most of my time working around (or doing theory instead of working on) "actually nonexisting data". ;-) Steve

[Python-ideas] Re: Adding str.remove()

2021-05-01 Thread David Mertz
On Sat, May 1, 2021, 3:17 AM Cameron Simpson wrote: > >Let's take a not-absurd hypothetical: > > > >GET [http://example.com/picture] 200 image/jpeg > >POST [http://nowhere.org/data] 200 application/json > >PUT [https://example.org/page] 200 text/html > > Though for this, they are ok. Or even

[Python-ideas] Re: Adding str.remove()

2021-05-01 Thread Cameron Simpson
On 01May2021 05:30, David Mertz wrote: >I was actually thinking about this before the recent "string comprehension" >thread. I wasn't really going to post the idea, but it's similar enough >that I am nudged to. Moreover, since PEP 616 added str.removeprefix() and >str.removesuffix(), this feels