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.

Author mushywushy
Recipients mushywushy
Date 2009-08-31.06:38:46
SpamBayes Score 6.1914366e-06
Marked as misclassified No
Message-id <1251700728.18.0.0769627143448.issue6809@psf.upfronthosting.co.za>
In-reply-to
Content
A simple lstrip on the following causes an extra character to be
stripped, as per the below. Tried on 2.6.1 and on 2.4.3, as below.

Python 2.6.1 (r261:67515, Feb 27 2009, 02:54:13)
[GCC 4.3.2 20081105 (Red Hat 4.3.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = "contact_work_phone_no"
>>> a.lstrip("contact")
'_work_phone_no'
>>> a.lstrip("contact_")
'work_phone_no'
>>> a = "contact_city"
>>> a.lstrip("contact_")
'ity'
>>> a.lstrip("con")
'tact_city'
>>> a.lstrip("contact")
'_city'
>>> a.lstrip("contact_")
'ity'
>>>


Python 2.4.3 (#1, Mar 14 2007, 19:01:42)
[GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = "contact_city"
>>> a.lstrip("contact_")
'ity'
>>>
History
Date User Action Args
2009-08-31 06:38:48mushywushysetrecipients: + mushywushy
2009-08-31 06:38:48mushywushysetmessageid: <1251700728.18.0.0769627143448.issue6809@psf.upfronthosting.co.za>
2009-08-31 06:38:46mushywushylinkissue6809 messages
2009-08-31 06:38:46mushywushycreate