This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: lstrip problem
Type: behavior Stage:
Components: None Versions: Python 2.7, Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Thomas.Turner, amaury.forgeotdarc
Priority: normal Keywords:

Created on 2012-03-09 11:51 by Thomas.Turner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg155225 - (view) Author: Thomas Turner (Thomas.Turner) Date: 2012-03-09 11:51
Problem with lstrip 

>>> s = 'msgid "supplier code"'
>>>
>>> s.lstrip('msgid "')
'upplier code"'
>>>

It should come back with supplier code"
To get round the bug I did 

>>> s.lstrip('msgid ').lstrip('"')
'supplier code"'
>>>
msg155226 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2012-03-09 12:06
This is expected behavior: http://docs.python.org/library/stdtypes.html#str.lstrip
"""The chars argument is not a prefix; rather, all combinations of its values are stripped"""
History
Date User Action Args
2022-04-11 14:57:27adminsetgithub: 58448
2012-03-09 12:06:03amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg155226

resolution: not a bug
2012-03-09 11:51:34Thomas.Turnercreate