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 davidghiurco
Recipients davidghiurco
Date 2018-04-26.02:50:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524711046.09.0.682650639539.issue33362@psf.upfronthosting.co.za>
In-reply-to
Content
No PR is attached since the issue is pretty trivial to reproduce but important nonetheless:

string = "LDA/AIC2/1919uc1b354363457"
print(string)
print(string.lstrip("LDA/"))

the stripped string should be "AIC2/1919uc1b354363457"
but is instead "IC2/1919uc1b354363457"

notice the leading "A" missing.

I've noticed this happens when the letter immediately following the slash is the same letter as the one immediately before the slash. Never contributed to python so I'm not exactly sure how to, but if anyone knowledgeable could take a look, this will probably be an easy fix.

Note: I am experiencing this on Python 3.6.4, specifically the Anaconda distribution. I have not tried another version.
History
Date User Action Args
2018-04-26 02:50:46davidghiurcosetrecipients: + davidghiurco
2018-04-26 02:50:46davidghiurcosetmessageid: <1524711046.09.0.682650639539.issue33362@psf.upfronthosting.co.za>
2018-04-26 02:50:46davidghiurcolinkissue33362 messages
2018-04-26 02:50:45davidghiurcocreate