3 ms·
It doesn't do what you think it does. From https://www.python.org/dev/peps/pep-0616/#rationale https://www.python.org/dev/peps/pep-0616/#rationale "There have
by brilee 6y ago
It doesn't do what you think it does. From https://www.python.org/dev/peps/pep-0616/#rationale https://www.python.org/dev/peps/pep-0616/#rationale
"There have been repeated issues on Python-Ideas [2] [3], Python-Dev [4] [5] [6] [7], the Bug Tracker, and StackOverflow [8], related to user confusion about the existing str.lstrip and str.rstrip methods. These users are typically expecting the behavior of removeprefix and removesuffix, but they are surprised that the parameter for lstrip is interpreted as a set of characters, not a substring."