New submission from Alex Grigoryev <[email protected]>:
These methods have confusing implicit behavior. I propose to make it explicit, either strip the exact sequence or chars or leave the string as is. In [1]: 'mailto:[email protected]'.lstrip('mailto') Out[1]: ':[email protected]' In [2]: 'mailto:[email protected]'.lstrip('mailto:') Out[2]: '[email protected]' In [3]: 'mailto:[email protected]'.lstrip('ailto:') Out[3]: 'mailto:[email protected]' ---------- messages: 338695 nosy: Alex Grigoryev priority: normal severity: normal status: open title: Proposal to make strip/lstrip/rstrip more explicit type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue36410> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
