PEP 616 "String methods to remove prefixes and suffixes" accepted

Hi, The Python Steering Council accepts the PEP 616 "String methods to remove prefixes and suffixes": https://www.python.org/dev/peps/pep-0616/ Congrats Dennis Sweeney! We just have one last request: we expect the documentation to explain well the difference between removeprefix()/removesuffix() and lstrip()/strip()/rstrip(), since it is the rationale of the PEP ;-) You can find the WIP implementation at: * https://github.com/python/cpython/pull/18939 * https://bugs.python.org/issue39939 Victor -- Night gathers, and now my watch begins. It shall not end until my death.

Congratulations, Dennis! Not 10 minutes ago I was writing code that could have used this functionality. And I got it wrong on my first attempt! I'm looking forward to it in 3.9. Eric On 4/20/2020 2:26 PM, Victor Stinner wrote:
Hi,
The Python Steering Council accepts the PEP 616 "String methods to remove prefixes and suffixes": https://www.python.org/dev/peps/pep-0616/
Congrats Dennis Sweeney!
We just have one last request: we expect the documentation to explain well the difference between removeprefix()/removesuffix() and lstrip()/strip()/rstrip(), since it is the rationale of the PEP ;-)
You can find the WIP implementation at:
* https://github.com/python/cpython/pull/18939 * https://bugs.python.org/issue39939
Victor

Congrats Dennis! I hope your PR lands soon. On Mon, Apr 20, 2020 at 12:40 PM Eric V. Smith <eric@trueblade.com> wrote:
Congratulations, Dennis!
Not 10 minutes ago I was writing code that could have used this functionality. And I got it wrong on my first attempt! I'm looking forward to it in 3.9.
Eric
On 4/20/2020 2:26 PM, Victor Stinner wrote:
Hi,
The Python Steering Council accepts the PEP 616 "String methods to remove prefixes and suffixes": https://www.python.org/dev/peps/pep-0616/
Congrats Dennis Sweeney!
We just have one last request: we expect the documentation to explain well the difference between removeprefix()/removesuffix() and lstrip()/strip()/rstrip(), since it is the rationale of the PEP ;-)
You can find the WIP implementation at:
* https://github.com/python/cpython/pull/18939 * https://bugs.python.org/issue39939
Victor
Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@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/VV2CFGYT... Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-c...>
participants (3)
-
Eric V. Smith
-
Guido van Rossum
-
Victor Stinner