Is there a proven use case for anything other than the empty string as the replacement? I prefer your "replacewhatever" to another "stripwhatever" name, and I think it's clear and nicely fits the behavior you proposed. But should we allow a naming convenience to dictate that the behavior should be generalized to a use case we're not sure exists, where the same same argument is passed 99% of the time? I think a downside would be that a pass-a-string-or-a-tuple-of-strings interface would be more mental effort to keep track of than a ``*args`` variadic interface for "(cut/remove/without/trim)prefix", even if the former is how ``startswith()`` works. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/KS25JX4V5LR3ZCV4EXU763RLTT24D4JT/ Code of Conduct: http://python.org/psf/codeofconduct/
- [Python-Dev] Re: PEP 616 -- String methods to ... Guido van Rossum
- [Python-Dev] Re: PEP 616 -- String method... Ivan Pozdeev via Python-Dev
- [Python-Dev] Re: PEP 616 -- String me... Kyle Stanley
- [Python-Dev] Re: PEP 616 -- Strin... Kyle Stanley
- [Python-Dev] Re: PEP 616 -- S... Gregory P. Smith
- [Python-Dev] Re: PEP 616 -- S... Victor Stinner
- [Python-Dev] Re: PEP 616 -- String method... Guido van Rossum
- [Python-Dev] Re: PEP 616 -- String me... Dennis Sweeney
- [Python-Dev] Re: PEP 616 -- String method... Mike Miller
- [Python-Dev] Re: PEP 616 -- String methods to ... Dennis Sweeney
- [Python-Dev] Re: PEP 616 -- String method... Nick Coghlan
- [Python-Dev] Re: PEP 616 -- String me... Brett Cannon
- [Python-Dev] Re: PEP 616 -- Strin... Steve Dower
- [Python-Dev] Re: PEP 616 -- S... Eric V. Smith
- [Python-Dev] Re: PEP 616 -- S... Ethan Furman
- [Python-Dev] Re: PEP 616 -- S... Eric Fahlgren
- [Python-Dev] Re: PEP 616 -- S... Kyle Stanley
- [Python-Dev] Re: PEP 616 -- Strin... Gregory P. Smith
- [Python-Dev] Re: PEP 616 -- Strin... Cameron Simpson
- [Python-Dev] Re: PEP 616 -- S... Sebastian Rittau