Oliver Urs Lenz <[email protected]> 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 <[email protected]> <https://bugs.python.org/issue25433> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
