STINNER Victor <vstin...@python.org> added the comment:

The documentation should explain well the difference between 
removeprefix()/removesuffix() and lstrip()/strip()/rstrip(), since it is the 
rationale of the PEP ;-)

An example that can be used to explain the difference:

>>> "Monty Python".removesuffix(" Python")
'Monty'
>>> "Monty Python".strip(" Python")
'M'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39939>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to