New submission from Zach Hirsch <[EMAIL PROTECTED]>: I've found that having a way to strip a leading substring from a string is convienent. I've also gotten bitten by the fact that str.strip takes a sequence of characters to remove from the beginning -- not a full string.
I've attached a patch that implements lstrips, rstrips, and strips on str, unicode, and as methods in the string module. I'm not particularly attached to the names. Please consider this patch for inclusion in Python. Thanks! ---------- components: Library (Lib) files: lstrips-67529.patch keywords: patch messages: 76953 nosy: zhirsch severity: normal status: open title: Add str method for removing leading or trailing substrings type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file12232/lstrips-67529.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4541> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com