On Wed, 25 Mar 2020 at 00:42, Dennis Sweeney
<sweeney.dennis...@gmail.com> wrote:
> There were at least two comments suggesting keeping it to one affix at a time:
> https://mail.python.org/archives/list/python-dev@python.org/message/GPXSIDLKTI6WKH5EKJWZEG5KR4AQ6P3J/
> https://mail.python.org/archives/list/python-dev@python.org/message/EDWFPEGQBPTQTVZV5NDRC2DLSKCXVJPZ/
> But I didn't see any big objections to the rest of the PEP, so I think maybe 
> we keep it restricted for now.

That sounds like a good idea. The issue for me is how the function
should behave with a list of affixes if one is a prefix of another,
e.g.,removeprefix(('Test', 'Tests')). The empty string case is just
one form of that. The behaviour should be defined clearly, and while I
imagine "always remove the longest" is the "obvious" sensible choice,
I am fairly certain there will be other opinions :-) So deferring the
decision for now until we have more experience with the single-affix
form seems perfectly reasonable.

I'm not even sure that switching to multiple affixes later would need
a PEP - it might be fine to add via a simple feature request issue.
But that can be a decision for later, too.

Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
Message archived at 
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to