[docs] [issue25433] whitespace in strip()/lstrip()/rstrip()

Oliver Urs Lenz report at bugs.python.org
Wed Apr 11 10:49:18 EDT 2018


Oliver Urs Lenz <oliver.urs.lenz at gmail.com> added the comment:

Slightly tangential, but it would be great if the documentation of lstrip() and rstrip() could include an equivalent definition in terms of re.sub(), e.g.:

lstrip(foo) == re.sub(r'(?u)\A\s*', '', foo)
rstrip(foo) == re.sub(r'(?u)\s*\Z', '', foo)

(Or whatever else is correct.)

----------
nosy: +oulenz

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25433>
_______________________________________


More information about the docs mailing list