Issue 3047: string object's lstrip function (original) (raw)
Issue3047
Created on 2008-06-06 07:43 by jsostok, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg67748 - (view) | Author: Jura (jsostok) | Date: 2008-06-06 07:43 |
example from command line: '_element_no_of_hsscch'.lstrip('_element_') 'o_of_hsscch' '_element_o_of_hsscch'.lstrip('_element_') 'o_of_hsscch' | ||
msg67751 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2008-06-06 07:49 |
What did you expect? Quoting from the docs, """The chars argument is not a prefix; rather, all combinations of its values are stripped: >>> 'www.example.com'.lstrip('cmowz.') 'example.com' """ | ||
msg67755 - (view) | Author: Jura (jsostok) | Date: 2008-06-06 08:11 |
print '_element_no_of_hsscch'.lstrip.__doc__ S.lstrip([chars]) -> string or unicode Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is unicode, S will be converted to unicode before stripping Ok, I didn't understand it correctly, because i red only __doc__ from which is not the functionality clear. I found a workaround for it... Let's leave it closed. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:35 | admin | set | github: 47297 |
2008-06-06 08:11:11 | jsostok | set | messages: + |
2008-06-06 07:49:34 | georg.brandl | set | status: open -> closedresolution: not a bugmessages: + nosy: + georg.brandl |
2008-06-06 07:43:19 | jsostok | create |