Message92102
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'
>>> |
|
Date |
User |
Action |
Args |
2009-08-31 06:38:48 | mushywushy | set | recipients:
+ mushywushy |
2009-08-31 06:38:48 | mushywushy | set | messageid: <1251700728.18.0.0769627143448.issue6809@psf.upfronthosting.co.za> |
2009-08-31 06:38:46 | mushywushy | link | issue6809 messages |
2009-08-31 06:38:46 | mushywushy | create | |
|